From c264ec107767c5bd727b6e21a75eb09016a8ee78 Mon Sep 17 00:00:00 2001 From: Harry-Hopkinson Date: Mon, 15 Apr 2024 15:28:51 +0000 Subject: [PATCH] Rename CHAT_HISTORY_SIZE to kChatHistorySize --- src/openrct2/interface/Chat.cpp | 4 ++-- src/openrct2/interface/Chat.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/openrct2/interface/Chat.cpp b/src/openrct2/interface/Chat.cpp index 2b967786ab..984ec3b2a8 100644 --- a/src/openrct2/interface/Chat.cpp +++ b/src/openrct2/interface/Chat.cpp @@ -158,7 +158,7 @@ void ChatDraw(DrawPixelInfo& dpi, uint8_t chatBackgroundColor) int32_t stringHeight = 0; // Draw chat history - for (size_t i = 0; i < CHAT_HISTORY_SIZE; i++, screenCoords.y -= stringHeight) + for (size_t i = 0; i < kChatHistorySize; i++, screenCoords.y -= stringHeight) { if (i >= _chatHistory.size()) break; @@ -220,7 +220,7 @@ void ChatAddHistory(std::string_view s) std::string buffer = timeBuffer; buffer += s; - if (_chatHistory.size() >= CHAT_HISTORY_SIZE) + if (_chatHistory.size() >= kChatHistorySize) { _chatHistory.pop_back(); _chatHistoryTime.pop_back(); diff --git a/src/openrct2/interface/Chat.h b/src/openrct2/interface/Chat.h index 4103025e1e..6d97565364 100644 --- a/src/openrct2/interface/Chat.h +++ b/src/openrct2/interface/Chat.h @@ -14,7 +14,7 @@ #include -#define CHAT_HISTORY_SIZE 10 +constexpr int8_t kChatHistorySize = 10; #define CHAT_INPUT_SIZE 1024 #define CHAT_MAX_MESSAGE_LENGTH 200 #define CHAT_MAX_WINDOW_WIDTH 600