You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@kvrocks.apache.org by GitBox <gi...@apache.org> on 2022/06/21 09:01:45 UTC

[GitHub] [incubator-kvrocks] git-hulk commented on a diff in pull request #643: Optimize happy path for constructing Status

git-hulk commented on code in PR #643:
URL: https://github.com/apache/incubator-kvrocks/pull/643#discussion_r902356147


##########
src/status.h:
##########
@@ -57,13 +57,18 @@ class Status {
     NetSendErr,
   };
 
-  Status() : Status(cOK, "ok") {}
-  explicit Status(Code code, std::string msg = "") : code_(code), msg_(std::move(msg)) {}
+  Status() : Status(cOK) {}

Review Comment:
   > because we already have a method named `OK` 🤣
   
   Yes, exactly. But `cOK` is NOT a good name since it's inconsistent with other code.



-- 
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: issues-unsubscribe@kvrocks.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org