mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-16 03:23:15 +01:00
Use std::copy for gParkRatingHistory
Co-authored-by: ζeh Matt <5415177+ZehMatt@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
600ce959d7
commit
a526caa1cb
@@ -2121,7 +2121,7 @@ namespace RCT1
|
||||
|
||||
auto& park = OpenRCT2::GetContext()->GetGameState()->GetPark();
|
||||
park.ResetHistories();
|
||||
std::memcpy(gParkRatingHistory, _s4.park_rating_history, sizeof(_s4.park_rating_history));
|
||||
std::copy(std::begin(_s4.park_rating_history), std::end(_s4.park_rating_history), gParkRatingHistory);
|
||||
for (size_t i = 0; i < std::size(_s4.guests_in_park_history); i++)
|
||||
{
|
||||
if (_s4.guests_in_park_history[i] != RCT12ParkHistoryUndefined)
|
||||
|
||||
@@ -351,7 +351,7 @@ void S6Exporter::Export()
|
||||
|
||||
_s6.park_rating = gParkRating;
|
||||
|
||||
std::memcpy(_s6.park_rating_history, gParkRatingHistory, sizeof(_s6.park_rating_history));
|
||||
std::copy(std::begin(gParkRatingHistory), std::end(gParkRatingHistory), _s6.park_rating_history);
|
||||
std::fill(std::begin(_s6.guests_in_park_history), std::end(_s6.guests_in_park_history), RCT12ParkHistoryUndefined);
|
||||
for (size_t i = 0; i < std::size(gGuestsInParkHistory); i++)
|
||||
{
|
||||
|
||||
@@ -272,7 +272,7 @@ public:
|
||||
|
||||
auto& park = OpenRCT2::GetContext()->GetGameState()->GetPark();
|
||||
park.ResetHistories();
|
||||
std::memcpy(gParkRatingHistory, _s6.park_rating_history, sizeof(_s6.park_rating_history));
|
||||
std::copy(std::begin(_s6.park_rating_history), std::end(_s6.park_rating_history), gParkRatingHistory);
|
||||
for (size_t i = 0; i < std::size(_s6.guests_in_park_history); i++)
|
||||
{
|
||||
if (_s6.guests_in_park_history[i] != RCT12ParkHistoryUndefined)
|
||||
|
||||
Reference in New Issue
Block a user