topology: Mark compare_endpoints() arguments as const
Continuation to debfcc0e (snitch: Move sort_by_proximity() to topology).
The passed addresses are not modified by the helper. They are not yet
const because the method was copy-n-pasted from snitch where it wasn't
such.
tests: unit(dev)
Signed-off-by: Pavel Emelyanov <xemul@scylladb.com>
Message-Id: <20220906074708.29574-1-xemul@scylladb.com>
This commit is contained in:
committed by
Avi Kivity
parent
4459cecfd6
commit
42c9f35374
@@ -1327,7 +1327,7 @@ void topology::sort_by_proximity(inet_address address, inet_address_vector_repli
|
||||
}
|
||||
}
|
||||
|
||||
int topology::compare_endpoints(inet_address& address, inet_address& a1, inet_address& a2) const {
|
||||
int topology::compare_endpoints(const inet_address& address, const inet_address& a1, const inet_address& a2) const {
|
||||
//
|
||||
// if one of the Nodes IS the Node we are comparing to and the other one
|
||||
// IS NOT - then return the appropriate result.
|
||||
|
||||
@@ -107,7 +107,7 @@ private:
|
||||
* compares two endpoints in relation to the target endpoint, returning as
|
||||
* Comparator.compare would
|
||||
*/
|
||||
int compare_endpoints(inet_address& address, inet_address& a1, inet_address& a2) const;
|
||||
int compare_endpoints(const inet_address& address, const inet_address& a1, const inet_address& a2) const;
|
||||
|
||||
/** multi-map: DC -> endpoints in that DC */
|
||||
std::unordered_map<sstring,
|
||||
|
||||
Reference in New Issue
Block a user