(svn r10210) -Codechange: make all money related variables 64 bits, so overflowing them should become a little harder.

This commit is contained in:
rubidium
2007-06-18 22:49:55 +00:00
parent 6900de65b9
commit 8220153e6b
7 changed files with 42 additions and 33 deletions

View File

@@ -69,7 +69,7 @@ typedef uint16 SignID;
typedef uint16 GroupID;
typedef uint16 EngineRenewID;
typedef uint16 DestinationID;
typedef int32 Money;
typedef int64 Money;
/* DestinationID must be at least as large as every these below, because it can
* be any of them
@@ -386,8 +386,6 @@ public:
* @param cst the initial cost of this command
*/
CommandCost(Money cst) : cost(cst), message(INVALID_STRING_ID), success(true) {}
/** "Hack" to make everything compile nicely, not needed when cost is int64 */
CommandCost(uint cst) : cost(cst), message(INVALID_STRING_ID), success(true) {}
/**
* Adds the cost of the given command return value to this cost.