mirror of https://github.com/OpenTTD/OpenTTD.git
Codechange: Use simple assignment to assign specs.
This commit is contained in:
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…
Reference in New Issue