# HG changeset patch # User peter1138 # Date 2008-02-12 11:46:29 # Node ID 87e345c9e13aa9de31448438027b6b37579945d3 # Parent 0e942322628107a8f80a0272bed857e5ff451e6a (svn r12120) -Cleanup: const-ify parameters when checking for same cargopacket source. diff --git a/src/cargopacket.cpp b/src/cargopacket.cpp --- 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 --- a/src/cargopacket.h +++ b/src/cargopacket.h @@ -53,7 +53,7 @@ struct CargoPacket : PoolItem