summaryrefslogtreecommitdiff
path: root/src/network/network_chat_gui.cpp
diff options
context:
space:
mode:
authorHenry Wilson <m3henry@googlemail.com>2019-04-10 22:07:06 +0100
committerMichael Lutz <michi@icosahedron.de>2019-04-10 23:22:20 +0200
commit7c8e7c6b6e16d4a26259a676db32d8776b99817e (patch)
tree99f134b7e66367cf11e10bc5061896eab4a3264f /src/network/network_chat_gui.cpp
parent3b4f224c0bc50e7248050d4bcbb6d83fd510c1cc (diff)
downloadopenttd-7c8e7c6b6e16d4a26259a676db32d8776b99817e.tar.xz
Codechange: Use null pointer literal instead of the NULL macro
Diffstat (limited to 'src/network/network_chat_gui.cpp')
-rw-r--r--src/network/network_chat_gui.cpp12
1 files changed, 6 insertions, 6 deletions
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)