Upgrade some char arrays to strings

This commit is contained in:
Michał Janiszewski 2018-02-07 21:51:09 +01:00 committed by Michał Janiszewski
parent 4c7053f581
commit 282553f0c5
3 changed files with 6 additions and 6 deletions

View File

@ -454,7 +454,7 @@ namespace OpenRCT2
}
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)

View File

@ -1255,7 +1255,7 @@ void game_fix_save_vars()
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)
{
@ -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
// which the window function doesn't like
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_COUNT, (uint32) ParkLoadResult_GetMissingObjectsCount(result));
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);
}

View File

@ -179,8 +179,8 @@ bool game_is_not_paused();
void save_game();
void * create_save_game_as_intent();
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(const ParkLoadResult * result, const utf8 * path);
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 std::string & path);
void game_autosave();
void game_convert_strings_to_utf8();
void game_convert_news_items_to_utf8();