1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-29 01:35:06 +01:00

Remove unnecessary else blocks

This commit is contained in:
Hielke Morsink
2021-09-15 22:22:15 +02:00
parent 427bb7b330
commit 4b4b3333d6
132 changed files with 1257 additions and 1632 deletions

View File

@@ -264,14 +264,12 @@ public:
{
return ObjectFactory::CreateObjectFromJsonFile(*this, ori->Path);
}
else if (String::Equals(extension, ".parkobj", true))
if (String::Equals(extension, ".parkobj", true))
{
return ObjectFactory::CreateObjectFromZipFile(*this, ori->Path);
}
else
{
return ObjectFactory::CreateObjectFromLegacyFile(*this, ori->Path.c_str());
}
return ObjectFactory::CreateObjectFromLegacyFile(*this, ori->Path.c_str());
}
void RegisterLoadedObject(const ObjectRepositoryItem* ori, std::unique_ptr<Object>&& object) override
@@ -447,12 +445,10 @@ private:
}
return true;
}
else
{
Console::Error::WriteLine("Object conflict: '%s'", conflict->Path.c_str());
Console::Error::WriteLine(" : '%s'", item.Path.c_str());
return false;
}
Console::Error::WriteLine("Object conflict: '%s'", conflict->Path.c_str());
Console::Error::WriteLine(" : '%s'", item.Path.c_str());
return false;
}
void ScanObject(const std::string& path)