summaryrefslogtreecommitdiff
path: root/src/cargopacket.h
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2007-08-30 20:40:33 +0000
committerrubidium <rubidium@openttd.org>2007-08-30 20:40:33 +0000
commit8a6cc3aa104b5f8631dcb74343dcd68ffa3308ec (patch)
tree1e96eadb775a124c36850f50c357f93af14e4be2 /src/cargopacket.h
parent9833639b00ff84b671a3943e350ed195935e31ad (diff)
downloadopenttd-8a6cc3aa104b5f8631dcb74343dcd68ffa3308ec.tar.xz
(svn r11009) -Codechange: unvirtualise IsValid as that isn't needed with templates. This gives up to 10% performance increase in games with lots of vehicles.
Diffstat (limited to 'src/cargopacket.h')
-rw-r--r--src/cargopacket.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cargopacket.h b/src/cargopacket.h
index 2dacb7bc2..3fde1bacc 100644
--- a/src/cargopacket.h
+++ b/src/cargopacket.h
@@ -43,7 +43,7 @@ struct CargoPacket : PoolItem<CargoPacket, CargoPacketID, &_CargoPacket_pool> {
* Is this a valid cargo packet ?
* @return true if and only it is valid
*/
- bool IsValid() const { return this->count != 0; }
+ inline bool IsValid() const { return this->count != 0; }
/**
* Checks whether the cargo packet is from (exactly) the same source