1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-20 13:33:02 +01:00

[NSF] Fix various implicit type casting warnings (#14656)

These warnings caused compilation to fail on VS2019 Version 16.10.0 Preview 2.1, because warnings are being treated as errors.
This commit is contained in:
Hielke Morsink
2021-05-15 00:29:23 +02:00
committed by GitHub
parent 6ad924878b
commit 7171c8ac0d
3 changed files with 6 additions and 5 deletions

View File

@@ -865,11 +865,12 @@ namespace OpenRCT2
cs.ReadWriteVector(banners, [version, &cs](Banner& banner) { ReadWriteBanner(version, cs, banner); });
for (size_t i = 0; i < banners.size(); i++)
{
auto banner = GetOrCreateBanner(i);
auto bannerIndex = static_cast<BannerIndex>(i);
auto banner = GetOrCreateBanner(bannerIndex);
if (banner != nullptr)
{
*banner = std::move(banners[i]);
banner->id = static_cast<BannerIndex>(i);
banner->id = bannerIndex;
}
}
}