diff options
author | peter1138 <peter1138@openttd.org> | 2008-02-12 11:46:29 +0000 |
---|---|---|
committer | peter1138 <peter1138@openttd.org> | 2008-02-12 11:46:29 +0000 |
commit | aefb78fcdf0afdfd256781adb29e1f063422d00d (patch) | |
tree | 2a3c3e2a75d3a81f1e2012c73c2effb80b431427 | |
parent | 57aacb50c87372dabddd2ab58537ef55ba9e3c3d (diff) | |
download | openttd-aefb78fcdf0afdfd256781adb29e1f063422d00d.tar.xz |
(svn r12120) -Cleanup: const-ify parameters when checking for same cargopacket source.
-rw-r--r-- | src/cargopacket.cpp | 2 | ||||
-rw-r--r-- | src/cargopacket.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/cargopacket.cpp b/src/cargopacket.cpp index a09a978a1..e97ff866c 100644 --- a/src/cargopacket.cpp +++ b/src/cargopacket.cpp @@ -37,7 +37,7 @@ CargoPacket::~CargoPacket() this->count = 0; } -bool CargoPacket::SameSource(CargoPacket *cp) +bool CargoPacket::SameSource(const CargoPacket *cp) const { return this->source_xy == cp->source_xy && this->days_in_transit == cp->days_in_transit && this->paid_for == cp->paid_for; } diff --git a/src/cargopacket.h b/src/cargopacket.h index 046857235..866b41ad0 100644 --- a/src/cargopacket.h +++ b/src/cargopacket.h @@ -53,7 +53,7 @@ struct CargoPacket : PoolItem<CargoPacket, CargoPacketID, &_CargoPacket_pool> { * @param cp the cargo packet to compare to * @return true if and only if days_in_transit and source_xy are equal */ - bool SameSource(CargoPacket *cp); + bool SameSource(const CargoPacket *cp) const; }; /** |