summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsmatz <smatz@openttd.org>2009-07-02 12:47:52 +0000
committersmatz <smatz@openttd.org>2009-07-02 12:47:52 +0000
commit1e6a12b75b48f879a636cdd63f471c1aeed044bd (patch)
treee4268e815c1d19e7d4241f7acd49ce7cf004cee4
parent6a0855f0d1cd953c8774a03a1abc06553310f1a5 (diff)
downloadopenttd-1e6a12b75b48f879a636cdd63f471c1aeed044bd.tar.xz
(svn r16724) -Fix (r16714): MSVC 64bit warnings (Rubidium)
-rw-r--r--src/ai/api/ai_types.hpp2
-rw-r--r--src/subsidy_base.h4
2 files changed, 4 insertions, 2 deletions
diff --git a/src/ai/api/ai_types.hpp b/src/ai/api/ai_types.hpp
index 1e7812cc6..c476c12d2 100644
--- a/src/ai/api/ai_types.hpp
+++ b/src/ai/api/ai_types.hpp
@@ -90,6 +90,7 @@ typedef OverflowSafeInt64 Money; //!< Money, stored in a 32bit/64bit safe way. F
typedef uint16 SignID; //!< The ID of a sign.
typedef uint16 StationID; //!< The ID of a station.
typedef uint16 StringID; //!< The ID of a string.
+typedef uint16 SubsidyID; //!< The ID of a subsidy.
typedef uint32 TileIndex; //!< The ID of a tile (just named differently).
typedef uint16 TownID; //!< The ID of a town.
typedef uint16 VehicleID; //!< The ID of a vehicle.
@@ -98,6 +99,5 @@ typedef uint16 WaypointID; //!< The ID of a waypoint.
/* Types we defined ourself, as the OpenTTD core doesn't have them (yet) */
typedef uint AIErrorType; //!< The types of errors inside the NoAI framework.
typedef BridgeType BridgeID; //!< The ID of a bridge.
-typedef uint16 SubsidyID; //!< The ID of a subsidy.
#endif /* AI_TYPES_HPP */
diff --git a/src/subsidy_base.h b/src/subsidy_base.h
index d172adfa5..aaba0fea5 100644
--- a/src/subsidy_base.h
+++ b/src/subsidy_base.h
@@ -8,6 +8,8 @@
#include "cargo_type.h"
#include "company_type.h"
+typedef uint16 SubsidyID; ///< ID of a subsidy
+
/** Struct about subsidies, offered and awarded */
struct Subsidy {
CargoID cargo_type; ///< Cargo type involved in this subsidy, CT_INVALID for invalid subsidy
@@ -19,7 +21,7 @@ struct Subsidy {
* Determines index of this subsidy
* @return index (in the Subsidy::array array)
*/
- FORCEINLINE size_t Index() const
+ FORCEINLINE SubsidyID Index() const
{
return this - Subsidy::array;
}