PragmaTwice commented on code in PR #2272:
URL: https://github.com/apache/kvrocks/pull/2272#discussion_r1580778475
##########
src/cluster/cluster.cc:
##########
@@ -567,10 +565,10 @@ std::string Cluster::genNodesDescription() {
return nodes_desc;
}
-std::map<std::string, std::string> Cluster::getClusterNodeSlots() const {
+std::map<std::string, std::string, std::less<>> Cluster::getClusterNodeSlots()
const {
Review Comment:
I don't think we should specify the compare type explicitly.
If it reported by sonarcloud, please suppress it.
##########
src/cluster/cluster.h:
##########
@@ -97,18 +97,18 @@ class Cluster {
private:
std::string getNodeIDBySlot(int slot) const;
std::string genNodesDescription();
- std::string genNodesInfo();
- std::map<std::string, std::string> getClusterNodeSlots() const;
+ std::string genNodesInfo() const;
+ std::map<std::string, std::string, std::less<>> getClusterNodeSlots() const;
Review Comment:
ditto
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]