summaryrefslogtreecommitdiff
path: root/src/newgrf_commons.cpp
diff options
context:
space:
mode:
authorsmatz <smatz@openttd.org>2009-06-26 14:02:27 +0000
committersmatz <smatz@openttd.org>2009-06-26 14:02:27 +0000
commitb668c24d463ca8059fd9be59efddb39298de9646 (patch)
tree5fbd935d6d1dc65d5ebc160333b25c09e2e5b6c7 /src/newgrf_commons.cpp
parentaf78d6a9bbc4142958f07b8774ef28d0b7c22f49 (diff)
downloadopenttd-b668c24d463ca8059fd9be59efddb39298de9646.tar.xz
(svn r16666) -Codechange: replace GetHouseSpecs() by HouseSpec::Get(), hide _house_specs[]
Diffstat (limited to 'src/newgrf_commons.cpp')
-rw-r--r--src/newgrf_commons.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/newgrf_commons.cpp b/src/newgrf_commons.cpp
index 266d801ac..acda32481 100644
--- a/src/newgrf_commons.cpp
+++ b/src/newgrf_commons.cpp
@@ -12,6 +12,7 @@
#include "newgrf_commons.h"
#include "station_map.h"
#include "tree_map.h"
+#include "core/mem_func.hpp"
/** Constructor of generic class
* @param offset end of original data for this entity. i.e: houses = 110
@@ -146,11 +147,11 @@ void HouseOverrideManager::SetEntitySpec(const HouseSpec *hs)
return;
}
- memcpy(&_house_specs[house_id], hs, sizeof(*hs));
+ MemCpyT(HouseSpec::Get(house_id), hs);
/* Now add the overrides. */
for (int i = 0; i != max_offset; i++) {
- HouseSpec *overridden_hs = GetHouseSpecs(i);
+ HouseSpec *overridden_hs = HouseSpec::Get(i);
if (entity_overrides[i] != hs->local_id || grfid_overrides[i] != hs->grffile->grfid) continue;