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

Use u8string for custom paths

This commit is contained in:
Michael Steenbeek
2022-01-27 14:21:46 +01:00
committed by GitHub
parent 2c8c940caa
commit 149b164ee8
10 changed files with 45 additions and 54 deletions

View File

@@ -135,19 +135,19 @@ std::unique_ptr<IPlatformEnvironment> OpenRCT2::CreatePlatformEnvironment()
basePaths[static_cast<size_t>(DIRBASE::DOCUMENTATION)] = Platform::GetDocsPath();
// Override paths that have been specified via the command line
if (!String::IsNullOrEmpty(gCustomRCT1DataPath))
if (!gCustomRCT1DataPath.empty())
{
basePaths[static_cast<size_t>(DIRBASE::RCT1)] = gCustomRCT1DataPath;
}
if (!String::IsNullOrEmpty(gCustomRCT2DataPath))
if (!gCustomRCT2DataPath.empty())
{
basePaths[static_cast<size_t>(DIRBASE::RCT2)] = gCustomRCT2DataPath;
}
if (!String::IsNullOrEmpty(gCustomOpenRCT2DataPath))
if (!gCustomOpenRCT2DataPath.empty())
{
basePaths[static_cast<size_t>(DIRBASE::OPENRCT2)] = gCustomOpenRCT2DataPath;
}
if (!String::IsNullOrEmpty(gCustomUserDataPath))
if (!gCustomUserDataPath.empty())
{
basePaths[static_cast<size_t>(DIRBASE::USER)] = gCustomUserDataPath;
basePaths[static_cast<size_t>(DIRBASE::CONFIG)] = gCustomUserDataPath;
@@ -168,11 +168,11 @@ std::unique_ptr<IPlatformEnvironment> OpenRCT2::CreatePlatformEnvironment()
{
config_save(configPath.c_str());
}
if (String::IsNullOrEmpty(gCustomRCT1DataPath))
if (gCustomRCT1DataPath.empty())
{
env->SetBasePath(DIRBASE::RCT1, String::ToStd(gConfigGeneral.rct1_path));
}
if (String::IsNullOrEmpty(gCustomRCT2DataPath))
if (gCustomRCT2DataPath.empty())
{
env->SetBasePath(DIRBASE::RCT2, gConfigGeneral.rct2_path);
}