locator: endpoint_dc_rack: define default operator==
and get rid of the ad-hoc implementation in network_topology_strategy. Signed-off-by: Benny Halevy <bhalevy@scylladb.com>
This commit is contained in:
@@ -28,10 +28,6 @@ struct hash<locator::endpoint_dc_rack> {
|
||||
|
||||
namespace locator {
|
||||
|
||||
bool operator==(const endpoint_dc_rack& d1, const endpoint_dc_rack& d2) {
|
||||
return std::tie(d1.dc, d1.rack) == std::tie(d2.dc, d2.rack);
|
||||
}
|
||||
|
||||
network_topology_strategy::network_topology_strategy(
|
||||
const replication_strategy_config_options& config_options) :
|
||||
abstract_replication_strategy(config_options,
|
||||
|
||||
@@ -25,6 +25,8 @@ using inet_address = gms::inet_address;
|
||||
struct endpoint_dc_rack {
|
||||
sstring dc;
|
||||
sstring rack;
|
||||
|
||||
bool operator==(const endpoint_dc_rack&) const = default;
|
||||
};
|
||||
|
||||
using dc_rack_fn = seastar::noncopyable_function<endpoint_dc_rack(inet_address)>;
|
||||
|
||||
Reference in New Issue
Block a user