mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-03-12 10:30:28 +00:00
(svn r12120) -Cleanup: const-ify parameters when checking for same cargopacket source.
This commit is contained in:
parent
e76f7c9359
commit
592e22cc3a
@ -37,7 +37,7 @@ CargoPacket::~CargoPacket()
|
|||||||
this->count = 0;
|
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;
|
return this->source_xy == cp->source_xy && this->days_in_transit == cp->days_in_transit && this->paid_for == cp->paid_for;
|
||||||
}
|
}
|
||||||
|
@ -53,7 +53,7 @@ struct CargoPacket : PoolItem<CargoPacket, CargoPacketID, &_CargoPacket_pool> {
|
|||||||
* @param cp the cargo packet to compare to
|
* @param cp the cargo packet to compare to
|
||||||
* @return true if and only if days_in_transit and source_xy are equal
|
* @return true if and only if days_in_transit and source_xy are equal
|
||||||
*/
|
*/
|
||||||
bool SameSource(CargoPacket *cp);
|
bool SameSource(const CargoPacket *cp) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user