summaryrefslogtreecommitdiff
path: root/src/net
diff options
context:
space:
mode:
authorThorbjørn Lindeijer <bjorn@lindeijer.nl>2024-10-23 12:04:54 +0200
committerThorbjørn Lindeijer <bjorn@lindeijer.nl>2025-03-13 09:44:31 +0100
commit79e4325192f3260ed4ded264e43da8429650bf72 (patch)
treee64eaf10c378078fa97aecbeac3fa325df605ba2 /src/net
parentbde9d2d83dc703dd961861c3e6705bca28303cdb (diff)
downloadmana-79e4325192f3260ed4ded264e43da8429650bf72.tar.gz
mana-79e4325192f3260ed4ded264e43da8429650bf72.tar.bz2
mana-79e4325192f3260ed4ded264e43da8429650bf72.tar.xz
mana-79e4325192f3260ed4ded264e43da8429650bf72.zip
Removed needless case-insensitive string comparisons
These are not necessary since we can instead make sure the referenced values match case, like we do for everything else. This affects server types in the server list and colors referenced in theme files. The server version was also compared case-insensitively for some reason.
Diffstat (limited to 'src/net')
-rw-r--r--src/net/manaserv/charhandler.cpp1
-rw-r--r--src/net/serverinfo.h8
2 files changed, 4 insertions, 5 deletions
diff --git a/src/net/manaserv/charhandler.cpp b/src/net/manaserv/charhandler.cpp
index 4d44aa93..8afbb90b 100644
--- a/src/net/manaserv/charhandler.cpp
+++ b/src/net/manaserv/charhandler.cpp
@@ -44,6 +44,7 @@
#include "utils/dtor.h"
#include "utils/gettext.h"
+#include "utils/stringutils.h"
extern Net::CharHandler *charHandler;
extern ManaServ::GameHandler *gameHandler;
diff --git a/src/net/serverinfo.h b/src/net/serverinfo.h
index d9520c1c..a9dc785c 100644
--- a/src/net/serverinfo.h
+++ b/src/net/serverinfo.h
@@ -21,8 +21,6 @@
#pragma once
-#include "utils/stringutils.h"
-
#include <cstdint>
#include <deque>
#include <string>
@@ -74,12 +72,12 @@ public:
static ServerType parseType(const std::string &type)
{
- if (compareStrI(type, "tmwathena") == 0)
+ if (type == "tmwathena")
return ServerType::TMWATHENA;
// Used for backward compatibility
- if (compareStrI(type, "eathena") == 0)
+ if (type == "eathena")
return ServerType::TMWATHENA;
- if (compareStrI(type, "manaserv") == 0)
+ if (type == "manaserv")
return ServerType::MANASERV;
return ServerType::UNKNOWN;
}