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/26 02:47:20 UTC

[GitHub] [incubator-kvrocks] PragmaTwice commented on a diff in pull request #673: use unique_ptr in src/server.h

PragmaTwice commented on code in PR #673:
URL: https://github.com/apache/incubator-kvrocks/pull/673#discussion_r906747134


##########
src/server.h:
##########
@@ -198,10 +198,10 @@ class Server {
 
   Stats stats_;
   Engine::Storage *storage_;
-  Cluster *cluster_;
+  std::unique_ptr<Cluster> cluster_;
   static std::atomic<int> unix_time_;
-  class SlotMigrate *slot_migrate_ = nullptr;
-  class SlotImport *slot_import_ = nullptr;
+  std::unique_ptr<class SlotMigrate> slot_migrate_;
+  class SlotImport *slot_import_;

Review Comment:
   ```suggestion
     class SlotImport *slot_import_ = nullptr;
   ```
   fix the cppcheck warning in CI.



-- 
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