diff options
author | frosch <frosch@openttd.org> | 2012-05-25 20:57:36 +0000 |
---|---|---|
committer | frosch <frosch@openttd.org> | 2012-05-25 20:57:36 +0000 |
commit | 522e5ec86bd9b216e09549ca1d5aba0378e8a95a (patch) | |
tree | df7102293cde02ffd93baadf1c420b8b48333994 /src/newgrf.h | |
parent | b8f6b300d641e091f300db65b8f57bf28cef5974 (diff) | |
download | openttd-522e5ec86bd9b216e09549ca1d5aba0378e8a95a.tar.xz |
(svn r24277) -Codechange: Store cargo and railtype translation tables in a SmallVector.
Diffstat (limited to 'src/newgrf.h')
-rw-r--r-- | src/newgrf.h | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/newgrf.h b/src/newgrf.h index 502699730..70fa6ceed 100644 --- a/src/newgrf.h +++ b/src/newgrf.h @@ -17,6 +17,7 @@ #include "fileio_type.h" #include "core/bitmath_func.hpp" #include "core/alloc_type.hpp" +#include "core/smallvec_type.hpp" /** * List of different canal 'features'. @@ -121,12 +122,10 @@ struct GRFFile : ZeroedMemoryAllocator { GRFLabel *label; ///< Pointer to the first label. This is a linked list, not an array. - uint8 cargo_max; - CargoLabel *cargo_list; - uint8 cargo_map[NUM_CARGO]; + SmallVector<CargoLabel, 4> cargo_list; ///< Cargo translation table (local ID -> label) + uint8 cargo_map[NUM_CARGO]; ///< Inverse cargo translation table (CargoID -> local ID) - uint8 railtype_max; - RailTypeLabel *railtype_list; + SmallVector<RailTypeLabel, 4> railtype_list; ///< Railtype translation table RailType railtype_map[RAILTYPE_END]; CanalProperties canal_local_properties[CF_END]; ///< Canal properties as set by this NewGRF |