mirror of https://github.com/OpenRCT2/OpenRCT2.git
Upgrade some char arrays to strings
This commit is contained in:
parent
4c7053f581
commit
282553f0c5
|
@ -454,7 +454,7 @@ namespace OpenRCT2
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
handle_park_load_failure_with_title_opt(&result, path.c_str(), loadTitleScreenFirstOnFail);
|
handle_park_load_failure_with_title_opt(&result, path, loadTitleScreenFirstOnFail);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (const std::exception &e)
|
catch (const std::exception &e)
|
||||||
|
|
|
@ -1255,7 +1255,7 @@ void game_fix_save_vars()
|
||||||
fix_ride_entrance_and_exit_locations();
|
fix_ride_entrance_and_exit_locations();
|
||||||
}
|
}
|
||||||
|
|
||||||
void handle_park_load_failure_with_title_opt(const ParkLoadResult * result, const utf8 * path, bool loadTitleFirst)
|
void handle_park_load_failure_with_title_opt(const ParkLoadResult * result, const std::string & path, bool loadTitleFirst)
|
||||||
{
|
{
|
||||||
if (ParkLoadResult_GetError(result) == PARK_LOAD_ERROR_MISSING_OBJECTS)
|
if (ParkLoadResult_GetError(result) == PARK_LOAD_ERROR_MISSING_OBJECTS)
|
||||||
{
|
{
|
||||||
|
@ -1268,7 +1268,7 @@ void handle_park_load_failure_with_title_opt(const ParkLoadResult * result, cons
|
||||||
// The path needs to be duplicated as it's a const here
|
// The path needs to be duplicated as it's a const here
|
||||||
// which the window function doesn't like
|
// which the window function doesn't like
|
||||||
auto intent = Intent(WC_OBJECT_LOAD_ERROR);
|
auto intent = Intent(WC_OBJECT_LOAD_ERROR);
|
||||||
intent.putExtra(INTENT_EXTRA_PATH, std::string{path, path + strnlen(path, MAX_PATH)});
|
intent.putExtra(INTENT_EXTRA_PATH, path);
|
||||||
intent.putExtra(INTENT_EXTRA_LIST, (void *) ParkLoadResult_GetMissingObjects(result));
|
intent.putExtra(INTENT_EXTRA_LIST, (void *) ParkLoadResult_GetMissingObjects(result));
|
||||||
intent.putExtra(INTENT_EXTRA_LIST_COUNT, (uint32) ParkLoadResult_GetMissingObjectsCount(result));
|
intent.putExtra(INTENT_EXTRA_LIST_COUNT, (uint32) ParkLoadResult_GetMissingObjectsCount(result));
|
||||||
context_open_intent(&intent);
|
context_open_intent(&intent);
|
||||||
|
@ -1294,7 +1294,7 @@ void handle_park_load_failure_with_title_opt(const ParkLoadResult * result, cons
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void handle_park_load_failure(const ParkLoadResult * result, const utf8 * path)
|
void handle_park_load_failure(const ParkLoadResult * result, const std::string & path)
|
||||||
{
|
{
|
||||||
handle_park_load_failure_with_title_opt(result, path, false);
|
handle_park_load_failure_with_title_opt(result, path, false);
|
||||||
}
|
}
|
||||||
|
|
|
@ -179,8 +179,8 @@ bool game_is_not_paused();
|
||||||
void save_game();
|
void save_game();
|
||||||
void * create_save_game_as_intent();
|
void * create_save_game_as_intent();
|
||||||
void save_game_as();
|
void save_game_as();
|
||||||
void handle_park_load_failure_with_title_opt(const ParkLoadResult * result, const utf8 * path, bool loadTitleFirst);
|
void handle_park_load_failure_with_title_opt(const ParkLoadResult * result, const std::string & path, bool loadTitleFirst);
|
||||||
void handle_park_load_failure(const ParkLoadResult * result, const utf8 * path);
|
void handle_park_load_failure(const ParkLoadResult * result, const std::string & path);
|
||||||
void game_autosave();
|
void game_autosave();
|
||||||
void game_convert_strings_to_utf8();
|
void game_convert_strings_to_utf8();
|
||||||
void game_convert_news_items_to_utf8();
|
void game_convert_news_items_to_utf8();
|
||||||
|
|
Loading…
Reference in New Issue