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:
@@ -17,7 +17,7 @@ namespace
|
|||||||
{
|
{
|
||||||
std::string className;
|
std::string className;
|
||||||
entity.at("classname").get_to(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!");
|
con::error("ERROR: first entity in the map entity string must be the worldspawn class!");
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
@@ -146,11 +146,12 @@ void SequenceZoneDefinitionMetaData::ProcessMatch(ZoneDefinitionParserState* sta
|
|||||||
{
|
{
|
||||||
return std::tolower(c);
|
return std::tolower(c);
|
||||||
});
|
});
|
||||||
if (valueLowerCase.compare("sp") == 0)
|
|
||||||
|
if (valueLowerCase == "sp")
|
||||||
state->SetMapType(ZoneDefinitionMapType::SP);
|
state->SetMapType(ZoneDefinitionMapType::SP);
|
||||||
else if (valueLowerCase.compare("mp") == 0)
|
else if (valueLowerCase == "mp")
|
||||||
state->SetMapType(ZoneDefinitionMapType::MP);
|
state->SetMapType(ZoneDefinitionMapType::MP);
|
||||||
else if (valueLowerCase.compare("zm") == 0)
|
else if (valueLowerCase == "zm")
|
||||||
state->SetMapType(ZoneDefinitionMapType::ZM);
|
state->SetMapType(ZoneDefinitionMapType::ZM);
|
||||||
else
|
else
|
||||||
throw ParsingException(valueToken.GetPos(), "map must be SP, MP or ZM");
|
throw ParsingException(valueToken.GetPos(), "map must be SP, MP or ZM");
|
||||||
|
|||||||
Reference in New Issue
Block a user