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:
committed by
GitHub
parent
2c8c940caa
commit
149b164ee8
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user