2
0
mirror of https://github.com/Laupetin/OpenAssetTools.git synced 2025-11-23 13:12:06 +00:00

chore: use std::string comparison instead of compare

This commit is contained in:
Jan Laupetin
2025-11-06 18:08:02 +01:00
parent 4eb6dcc469
commit 02a3d4e7cf
2 changed files with 5 additions and 4 deletions

View File

@@ -17,7 +17,7 @@ namespace
{
std::string className;
entity.at("classname").get_to(className);
if (className.compare("worldspawn") != 0)
if (className != "worldspawn")
{
con::error("ERROR: first entity in the map entity string must be the worldspawn class!");
return false;

View File

@@ -146,11 +146,12 @@ void SequenceZoneDefinitionMetaData::ProcessMatch(ZoneDefinitionParserState* sta
{
return std::tolower(c);
});
if (valueLowerCase.compare("sp") == 0)
if (valueLowerCase == "sp")
state->SetMapType(ZoneDefinitionMapType::SP);
else if (valueLowerCase.compare("mp") == 0)
else if (valueLowerCase == "mp")
state->SetMapType(ZoneDefinitionMapType::MP);
else if (valueLowerCase.compare("zm") == 0)
else if (valueLowerCase == "zm")
state->SetMapType(ZoneDefinitionMapType::ZM);
else
throw ParsingException(valueToken.GetPos(), "map must be SP, MP or ZM");