Codechange: Use simple assignment to assign specs.

pull/544/head
Peter Nelson 1 year ago committed by PeterN
parent 087654501b
commit 370a8d77a4

@ -181,7 +181,7 @@ void AirportOverrideManager::SetEntitySpec(AirportSpec *as)
return;
}
memcpy(AirportSpec::GetWithoutOverride(airport_id), as, sizeof(*as));
*AirportSpec::GetWithoutOverride(airport_id) = *as;
/* Now add the overrides. */
for (int i = 0; i < this->max_offset; i++) {

@ -73,7 +73,7 @@ void AirportTileOverrideManager::SetEntitySpec(const AirportTileSpec *airpts)
return;
}
memcpy(&AirportTileSpec::tiles[airpt_id], airpts, sizeof(*airpts));
AirportTileSpec::tiles[airpt_id] = *airpts;
/* Now add the overrides. */
for (int i = 0; i < this->max_offset; i++) {

@ -164,7 +164,7 @@ void HouseOverrideManager::SetEntitySpec(const HouseSpec *hs)
return;
}
MemCpyT(HouseSpec::Get(house_id), hs);
*HouseSpec::Get(house_id) = *hs;
/* Now add the overrides. */
for (int i = 0; i < this->max_offset; i++) {
@ -273,7 +273,7 @@ void IndustryTileOverrideManager::SetEntitySpec(const IndustryTileSpec *its)
return;
}
memcpy(&_industry_tile_specs[indt_id], its, sizeof(*its));
_industry_tile_specs[indt_id] = *its;
/* Now add the overrides. */
for (int i = 0; i < this->max_offset; i++) {

Loading…
Cancel
Save