summaryrefslogtreecommitdiff
path: root/src/network/network_gui.cpp
diff options
context:
space:
mode:
authorrubidium42 <rubidium@openttd.org>2021-05-14 17:43:23 +0200
committerrubidium42 <rubidium42@users.noreply.github.com>2021-05-16 10:07:51 +0200
commite90b2649b651e3ede41a2a40e70ab79ea4270dfe (patch)
treed93c6006a76b58bf817f31af3b6df3f23bd18c52 /src/network/network_gui.cpp
parent5c01f9ea525616b432968df845a90da1d888631f (diff)
downloadopenttd-e90b2649b651e3ede41a2a40e70ab79ea4270dfe.tar.xz
Codechange: [Network] Let NetworkCompanyInfo use std::string
Diffstat (limited to 'src/network/network_gui.cpp')
-rw-r--r--src/network/network_gui.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/network/network_gui.cpp b/src/network/network_gui.cpp
index 8dec56a6d..f0c28530a 100644
--- a/src/network/network_gui.cpp
+++ b/src/network/network_gui.cpp
@@ -1283,7 +1283,7 @@ struct NetworkLobbyWindow : public Window {
{
/* Scroll through all this->company_info and get the 'pos' item that is not empty. */
for (CompanyID i = COMPANY_FIRST; i < MAX_COMPANIES; i++) {
- if (!StrEmpty(this->company_info[i].company_name)) {
+ if (!this->company_info[i].company_name.empty()) {
if (pos-- == 0) return i;
}
}
@@ -1398,7 +1398,7 @@ struct NetworkLobbyWindow : public Window {
GfxFillRect(r.left + 1, r.top + 1, r.right - 1, r.top + detail_height - 1, PC_DARK_BLUE);
DrawString(r.left + WD_FRAMERECT_LEFT, r.right - WD_FRAMERECT_RIGHT, r.top + 12, STR_NETWORK_GAME_LOBBY_COMPANY_INFO, TC_FROMSTRING, SA_HOR_CENTER);
- if (this->company == INVALID_COMPANY || StrEmpty(this->company_info[this->company].company_name)) return;
+ if (this->company == INVALID_COMPANY || this->company_info[this->company].company_name.empty()) return;
int y = r.top + detail_height + 4;
const NetworkGameInfo *gi = &this->server->info;