mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2025-11-22 21:02:07 +00:00
chore: use std::string comparison instead of compare
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user