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/23 00:56:16 UTC

[GitHub] [incubator-kvrocks] caipengbo commented on a diff in pull request #650: Add a unique_ptr wrapper for rocksdb::Iterator

caipengbo commented on code in PR #650:
URL: https://github.com/apache/incubator-kvrocks/pull/650#discussion_r904428217


##########
src/util.h:
##########
@@ -72,7 +75,17 @@ uint64_t GetTimeStampUS(void);
 // refer to https://en.cppreference.com/w/cpp/memory/unique_ptr/make_unique
 template <typename T, typename... Args>
 std::unique_ptr<T> MakeUnique(Args&& ... args) {
-     return std::unique_ptr<T>(new T(std::forward<Args>(args)...));
+  return std::unique_ptr<T>(new T(std::forward<Args>(args)...));
 }
 
+struct UniqueIterator : std::unique_ptr<rocksdb::Iterator> {

Review Comment:
   Should we reveal on the name that this is the Rocksdb iterator?



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