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 /db/dbformat.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 'db/dbformat.h')
-rw-r--r-- | db/dbformat.h | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/db/dbformat.h b/db/dbformat.h index bdc23b8..013028a 100644 --- a/db/dbformat.h +++ b/db/dbformat.h @@ -181,6 +181,9 @@ class LookupKey { // the specified sequence number. LookupKey(const Slice& user_key, SequenceNumber sequence); + LookupKey(const LookupKey&) = delete; + LookupKey& operator=(const LookupKey&) = delete; + ~LookupKey(); // Return a key suitable for lookup in a MemTable. @@ -204,10 +207,6 @@ class LookupKey { const char* kstart_; const char* end_; char space_[200]; // Avoid allocation for short keys - - // No copying allowed - LookupKey(const LookupKey&); - void operator=(const LookupKey&); }; inline LookupKey::~LookupKey() { |