From edf3ceb52cc1c253c0d4333d7e4ea13f38a485ab Mon Sep 17 00:00:00 2001 From: Tim Wojtulewicz Date: Tue, 10 Jun 2025 10:10:34 -0700 Subject: [PATCH] Fix clang-tidy modernize-use-nullptr warnings in headers --- src/DebugLogger.h | 2 +- src/Dict.h | 2 +- src/analyzer/protocol/login/Login.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/DebugLogger.h b/src/DebugLogger.h index fe8527e04e..867fe93f33 100644 --- a/src/DebugLogger.h +++ b/src/DebugLogger.h @@ -71,7 +71,7 @@ public: DebugLogger() = default; ~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(const plugin::Plugin& plugin, const char* fmt, ...) __attribute__((format(printf, 3, 4))); diff --git a/src/Dict.h b/src/Dict.h index 0358d07cac..018bc28442 100644 --- a/src/Dict.h +++ b/src/Dict.h @@ -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; for ( int i = 0; i < num_distances; i++ ) distances[i] = 0; diff --git a/src/analyzer/protocol/login/Login.h b/src/analyzer/protocol/login/Login.h index e8dbf012d8..985d6d4b25 100644 --- a/src/analyzer/protocol/login/Login.h +++ b/src/analyzer/protocol/login/Login.h @@ -64,7 +64,7 @@ protected: // If we have more user text than this unprocessed, we complain about // excessive typeahead. #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 num_user_text; // number of entries in user_text