Fix clang-tidy modernize-use-nullptr warnings in headers

This commit is contained in:
Tim Wojtulewicz 2025-06-10 10:10:34 -07:00
parent f15cab4a2b
commit edf3ceb52c
3 changed files with 3 additions and 3 deletions

View file

@ -71,7 +71,7 @@ public:
DebugLogger() = default; DebugLogger() = default;
~DebugLogger(); ~DebugLogger();
void OpenDebugLog(const char* filename = 0); void OpenDebugLog(const char* filename = nullptr);
void Log(DebugStream stream, const char* fmt, ...) __attribute__((format(printf, 3, 4))); void Log(DebugStream stream, const char* fmt, ...) __attribute__((format(printf, 3, 4)));
void Log(const plugin::Plugin& plugin, const char* fmt, ...) __attribute__((format(printf, 3, 4))); void Log(const plugin::Plugin& plugin, const char* fmt, ...) __attribute__((format(printf, 3, 4)));

View file

@ -880,7 +880,7 @@ public:
} }
} }
void DistanceStats(int& max_distance, int* distances = 0, int num_distances = 0) const { void DistanceStats(int& max_distance, int* distances = nullptr, int num_distances = 0) const {
max_distance = 0; max_distance = 0;
for ( int i = 0; i < num_distances; i++ ) for ( int i = 0; i < num_distances; i++ )
distances[i] = 0; distances[i] = 0;

View file

@ -64,7 +64,7 @@ protected:
// If we have more user text than this unprocessed, we complain about // If we have more user text than this unprocessed, we complain about
// excessive typeahead. // excessive typeahead.
#define MAX_USER_TEXT 12 #define MAX_USER_TEXT 12
char* user_text[MAX_USER_TEXT] = {0}; char* user_text[MAX_USER_TEXT] = {nullptr};
int user_text_first, user_text_last; // indices into user_text int user_text_first, user_text_last; // indices into user_text
int num_user_text; // number of entries in user_text int num_user_text; // number of entries in user_text