Codechange: Use null pointer literal instead of the NULL macro

This commit is contained in:
Henry Wilson
2019-04-10 22:07:06 +01:00
committed by Michael Lutz
parent 3b4f224c0b
commit 7c8e7c6b6e
463 changed files with 5674 additions and 5674 deletions

View File

@@ -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)