From 7c8e7c6b6e16d4a26259a676db32d8776b99817e Mon Sep 17 00:00:00 2001 From: Henry Wilson Date: Wed, 10 Apr 2019 22:07:06 +0100 Subject: Codechange: Use null pointer literal instead of the NULL macro --- src/network/network_chat_gui.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/network/network_chat_gui.cpp') diff --git a/src/network/network_chat_gui.cpp b/src/network/network_chat_gui.cpp index 21607e9e8..e7e22db99 100644 --- a/src/network/network_chat_gui.cpp +++ b/src/network/network_chat_gui.cpp @@ -46,7 +46,7 @@ struct ChatMessage { }; /* used for chat window */ -static ChatMessage *_chatmsg_list = NULL; ///< The actual chat message list. +static ChatMessage *_chatmsg_list = nullptr; ///< The actual chat message list. static bool _chatmessage_dirty = false; ///< Does the chat message need repainting? static bool _chatmessage_visible = false; ///< Is a chat message visible. static bool _chat_tab_completion_active; ///< Whether tab completion is active. @@ -57,7 +57,7 @@ static uint MAX_CHAT_MESSAGES = 0; ///< The limit of chat messages to sho * the left and pixels from the bottom. The height is the maximum height. */ static PointDimension _chatmsg_box; -static uint8 *_chatmessage_backup = NULL; ///< Backup in case text is moved. +static uint8 *_chatmessage_backup = nullptr; ///< Backup in case text is moved. /** * Count the chat messages. @@ -360,7 +360,7 @@ struct NetworkChatWindow : public Window { } } - return NULL; + return nullptr; } /** @@ -371,7 +371,7 @@ struct NetworkChatWindow : public Window { static char *ChatTabCompletionFindText(char *buf) { char *p = strrchr(buf, ' '); - if (p == NULL) return buf; + if (p == nullptr) return buf; *p = '\0'; return p + 1; @@ -400,7 +400,7 @@ struct NetworkChatWindow : public Window { tb_buf = ChatTabCompletionFindText(pre_buf); tb_len = strlen(tb_buf); - while ((cur_name = ChatTabCompletionNextItem(&item)) != NULL) { + while ((cur_name = ChatTabCompletionNextItem(&item)) != nullptr) { item++; if (_chat_tab_completion_active) { @@ -543,7 +543,7 @@ static const NWidgetPart _nested_chat_window_widgets[] = { /** The description of the chat window. */ static WindowDesc _chat_window_desc( - WDP_MANUAL, NULL, 0, 0, + WDP_MANUAL, nullptr, 0, 0, WC_SEND_NETWORK_MSG, WC_NONE, 0, _nested_chat_window_widgets, lengthof(_nested_chat_window_widgets) -- cgit v1.2.3-54-g00ecf