1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-08-19 20:49:11 +00:00

Codechange: replace x.size() != 0 with !x.empty()

This commit is contained in:
Rubidium
2023-10-20 20:22:49 +02:00
committed by rubidium42
parent f16399f4c9
commit 37f84b7372
11 changed files with 12 additions and 12 deletions

View File

@@ -50,7 +50,7 @@ bool NetworkUDPSocketHandler::Listen()
addr.Listen(SOCK_DGRAM, &this->sockets);
}
return this->sockets.size() != 0;
return !this->sockets.empty();
}
/**

View File

@@ -67,7 +67,7 @@ static uint8_t *_chatmessage_backup = nullptr; ///< Backup in case text is moved
*/
static inline bool HaveChatMessages(bool show_all)
{
if (show_all) return _chatmsg_list.size() != 0;
if (show_all) return !_chatmsg_list.empty();
auto now = std::chrono::steady_clock::now();
for (auto &cmsg : _chatmsg_list) {