diff options
author | Chris Mumford <cmumford@google.com> | 2019-05-03 09:31:18 -0700 |
---|---|---|
committer | Chris Mumford <cmumford@google.com> | 2019-05-03 09:48:57 -0700 |
commit | 9bd23c767601a2420478eec158927882b879bada (patch) | |
tree | 1b40c3712c8d882bab5d339a572e56527c145b56 /include/leveldb/iterator.h | |
parent | c784d63b931d07895833fb80185b10d44ad63cce (diff) | |
download | leveldb-9bd23c767601a2420478eec158927882b879bada.tar.gz |
Correct class/structure declaration order.
1. Correct the class/struct declaration order to be IAW
the Google C++ style guide[1].
2. For non-copyable classes, switched from non-implemented
private methods to explicitly deleted[2] methods.
3. Minor const and member initialization fixes.
[1] https://google.github.io/styleguide/cppguide.html#Declaration_Order
[2] http://eel.is/c++draft/dcl.fct.def.delete
PiperOrigin-RevId: 246521844
Diffstat (limited to 'include/leveldb/iterator.h')
-rw-r--r-- | include/leveldb/iterator.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/include/leveldb/iterator.h b/include/leveldb/iterator.h index 447e950..bb9a5df 100644 --- a/include/leveldb/iterator.h +++ b/include/leveldb/iterator.h @@ -84,12 +84,6 @@ class LEVELDB_EXPORT Iterator { // Cleanup functions are stored in a single-linked list. // The list's head node is inlined in the iterator. struct CleanupNode { - // The head node is used if the function pointer is not null. - CleanupFunction function; - void* arg1; - void* arg2; - CleanupNode* next; - // True if the node is not used. Only head nodes might be unused. bool IsEmpty() const { return function == nullptr; } // Invokes the cleanup function. @@ -97,6 +91,12 @@ class LEVELDB_EXPORT Iterator { assert(function != nullptr); (*function)(arg1, arg2); } + + // The head node is used if the function pointer is not null. + CleanupFunction function; + void* arg1; + void* arg2; + CleanupNode* next; }; CleanupNode cleanup_head_; }; |