From f16314d0cc8a7b79ac48d4835f55a0968ccb77e6 Mon Sep 17 00:00:00 2001 From: smatz Date: Thu, 16 Jul 2009 21:37:59 +0000 Subject: (svn r16853) -Codechange: make CargoSpec const at two places --- src/cargotype.cpp | 4 ++-- src/cargotype.h | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/cargotype.cpp b/src/cargotype.cpp index b239b9362..c4b80c57e 100644 --- a/src/cargotype.cpp +++ b/src/cargotype.cpp @@ -56,7 +56,7 @@ void SetupCargoForClimate(LandscapeID l) CargoID GetCargoIDByLabel(CargoLabel cl) { - CargoSpec *cs; + const CargoSpec *cs; FOR_ALL_CARGOSPECS(cs) { if (cs->label == cl) return cs->Index(); } @@ -74,7 +74,7 @@ CargoID GetCargoIDByBitnum(uint8 bitnum) { if (bitnum == INVALID_CARGO) return CT_INVALID; - CargoSpec *cs; + const CargoSpec *cs; FOR_ALL_CARGOSPECS(cs) { if (cs->bitnum == bitnum) return cs->Index(); } diff --git a/src/cargotype.h b/src/cargotype.h index b6649658f..4d5ecbe15 100644 --- a/src/cargotype.h +++ b/src/cargotype.h @@ -70,8 +70,8 @@ struct CargoSpec { } /** - * Total number of subsidies, both valid and invalid - * @return length of Subsidy::array + * Total number of cargospecs, both valid and invalid + * @return length of CargoSpec::array */ static FORCEINLINE size_t GetArraySize() { @@ -90,7 +90,7 @@ struct CargoSpec { } private: - static CargoSpec array[NUM_CARGO]; + static CargoSpec array[NUM_CARGO]; ///< Array holding all CargoSpecs friend void SetupCargoForClimate(LandscapeID l); }; -- cgit v1.2.3-54-g00ecf