1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-24 15:24:30 +01:00

Use named casts on openrct2/(util|windows|scenario|title) (#11146)

This commit is contained in:
Tulio Leao
2020-04-17 14:45:19 -03:00
committed by GitHub
parent fd69886350
commit 116bcb5ccb
8 changed files with 69 additions and 67 deletions

View File

@@ -468,13 +468,13 @@ private:
scenario_index_entry* GetByFilename(const utf8* filename)
{
const ScenarioRepository* repo = this;
return (scenario_index_entry*)repo->GetByFilename(filename);
return const_cast<scenario_index_entry*>(repo->GetByFilename(filename));
}
scenario_index_entry* GetByPath(const utf8* path)
{
const ScenarioRepository* repo = this;
return (scenario_index_entry*)repo->GetByPath(path);
return const_cast<scenario_index_entry*>(repo->GetByPath(path));
}
/**
@@ -729,7 +729,7 @@ private:
{
auto fs = FileStream(path, FILE_MODE_WRITE);
fs.WriteValue<uint32_t>(HighscoreFileVersion);
fs.WriteValue<uint32_t>((uint32_t)_highscores.size());
fs.WriteValue<uint32_t>(static_cast<uint32_t>(_highscores.size()));
for (size_t i = 0; i < _highscores.size(); i++)
{
const scenario_highscore_entry* highscore = _highscores[i];