summaryrefslogtreecommitdiff
path: root/src/cargotype.h
diff options
context:
space:
mode:
authortruebrain <truebrain@openttd.org>2011-12-20 17:57:56 +0000
committertruebrain <truebrain@openttd.org>2011-12-20 17:57:56 +0000
commit1c9bec19993417b1f3b240f2bdb0745aa26c0cb3 (patch)
treed09407cc962ee87ac1bbbbc60951cad74c6b1db7 /src/cargotype.h
parent7a38642a1c83531a65907ae784bc03a82d35132a (diff)
downloadopenttd-1c9bec19993417b1f3b240f2bdb0745aa26c0cb3.tar.xz
(svn r23640) -Fix: stop using FORCEINLINE (1/3rd of the instances were, the others were still regular inline), but make sure inline is always a 'forced' inline (I am looking at you MSVC)
Diffstat (limited to 'src/cargotype.h')
-rw-r--r--src/cargotype.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/cargotype.h b/src/cargotype.h
index 1f19d10b3..9521f29d5 100644
--- a/src/cargotype.h
+++ b/src/cargotype.h
@@ -85,7 +85,7 @@ struct CargoSpec {
* Determines index of this cargospec
* @return index (in the CargoSpec::array array)
*/
- FORCEINLINE CargoID Index() const
+ inline CargoID Index() const
{
return this - CargoSpec::array;
}
@@ -95,7 +95,7 @@ struct CargoSpec {
* @return is this cargospec valid?
* @note assert(cs->IsValid()) can be triggered when GRF config is modified
*/
- FORCEINLINE bool IsValid() const
+ inline bool IsValid() const
{
return this->bitnum != INVALID_CARGO;
}
@@ -104,7 +104,7 @@ struct CargoSpec {
* Total number of cargospecs, both valid and invalid
* @return length of CargoSpec::array
*/
- static FORCEINLINE size_t GetArraySize()
+ static inline size_t GetArraySize()
{
return lengthof(CargoSpec::array);
}
@@ -114,7 +114,7 @@ struct CargoSpec {
* @param index ID of cargo
* @pre index is a valid cargo ID
*/
- static FORCEINLINE CargoSpec *Get(size_t index)
+ static inline CargoSpec *Get(size_t index)
{
assert(index < lengthof(CargoSpec::array));
return &CargoSpec::array[index];