Make getDesiredClusterKeyName const

This fixes a virtual function overload in NameQuorumChange
This commit is contained in:
sfc-gh-tclinkenbeard 2020-10-15 10:39:38 -07:00
parent 5f1ee16706
commit 0718329705
2 changed files with 2 additions and 2 deletions

View File

@ -1125,7 +1125,7 @@ struct NameQuorumChange final : IQuorumChange {
CoordinatorsResult& t) override { CoordinatorsResult& t) override {
return otherChange->getDesiredCoordinators(tr, oldCoordinators, cf, t); return otherChange->getDesiredCoordinators(tr, oldCoordinators, cf, t);
} }
std::string getDesiredClusterKeyName() const { return newName; } std::string getDesiredClusterKeyName() const override { return newName; }
}; };
Reference<IQuorumChange> nameQuorumChange(std::string const& name, Reference<IQuorumChange> const& other) { Reference<IQuorumChange> nameQuorumChange(std::string const& name, Reference<IQuorumChange> const& other) {
return Reference<IQuorumChange>(new NameQuorumChange( name, other )); return Reference<IQuorumChange>(new NameQuorumChange( name, other ));

View File

@ -140,7 +140,7 @@ struct IQuorumChange : ReferenceCounted<IQuorumChange> {
vector<NetworkAddress> oldCoordinators, vector<NetworkAddress> oldCoordinators,
Reference<ClusterConnectionFile>, Reference<ClusterConnectionFile>,
CoordinatorsResult&) = 0; CoordinatorsResult&) = 0;
virtual std::string getDesiredClusterKeyName() { return std::string(); } virtual std::string getDesiredClusterKeyName() const { return std::string(); }
}; };
// Change to use the given set of coordination servers // Change to use the given set of coordination servers