1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-16 03:23:15 +01:00

Rename String methods to use lowerCamelCase

This commit is contained in:
Aaron van Geffen
2024-12-11 22:28:31 +01:00
parent a24dc2e60a
commit 35e117aca2
102 changed files with 587 additions and 589 deletions

View File

@@ -98,11 +98,11 @@ public:
{
std::unique_ptr<Object> object;
auto extension = Path::GetExtension(path);
if (String::IEquals(extension, ".json"))
if (String::iequals(extension, ".json"))
{
object = ObjectFactory::CreateObjectFromJsonFile(_objectRepository, path, false);
}
else if (String::IEquals(extension, ".parkobj"))
else if (String::iequals(extension, ".parkobj"))
{
object = ObjectFactory::CreateObjectFromZipFile(_objectRepository, path, false);
}
@@ -169,7 +169,7 @@ protected:
private:
bool IsTrackReadOnly(const std::string& path) const
{
return String::StartsWith(path, SearchPaths[0]) || String::StartsWith(path, SearchPaths[1]);
return String::startsWith(path, SearchPaths[0]) || String::startsWith(path, SearchPaths[1]);
}
};
@@ -264,11 +264,11 @@ public:
Guard::ArgumentNotNull(ori, GUARD_LINE);
auto extension = Path::GetExtension(ori->Path);
if (String::IEquals(extension, ".json"))
if (String::iequals(extension, ".json"))
{
return ObjectFactory::CreateObjectFromJsonFile(*this, ori->Path, !gOpenRCT2NoGraphics);
}
if (String::IEquals(extension, ".parkobj"))
if (String::iequals(extension, ".parkobj"))
{
return ObjectFactory::CreateObjectFromZipFile(*this, ori->Path, !gOpenRCT2NoGraphics);
}
@@ -364,7 +364,7 @@ private:
void SortItems()
{
std::sort(_items.begin(), _items.end(), [](const ObjectRepositoryItem& a, const ObjectRepositoryItem& b) -> bool {
return String::Compare(a.Name, b.Name) < 0;
return String::compare(a.Name, b.Name) < 0;
});
// Fix the IDs
@@ -595,7 +595,7 @@ private:
while (File::Exists(fullPath))
{
counter++;
fullPath = Path::Combine(userObjPath, String::StdFormat("%s-%02X%s", fileName.c_str(), counter, extension));
fullPath = Path::Combine(userObjPath, String::stdFormat("%s-%02X%s", fileName.c_str(), counter, extension));
}
return fullPath;
@@ -622,7 +622,7 @@ private:
}
// Convert to UTF-8 filename
return String::ConvertToUtf8(normalisedName, OpenRCT2::CodePage::CP_1252);
return String::convertToUtf8(normalisedName, OpenRCT2::CodePage::CP_1252);
}
else
{
@@ -635,7 +635,7 @@ private:
const ObjectRepositoryItem* item = FindObject(entry);
if (item == nullptr)
{
throw std::runtime_error(String::StdFormat("Unable to find object '%.8s'", entry->name));
throw std::runtime_error(String::stdFormat("Unable to find object '%.8s'", entry->name));
}
// Read object data from file