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 /table/table_builder.cc | |
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 'table/table_builder.cc')
-rw-r--r-- | table/table_builder.cc | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/table/table_builder.cc b/table/table_builder.cc index 9afff76..278febf 100644 --- a/table/table_builder.cc +++ b/table/table_builder.cc @@ -19,6 +19,22 @@ namespace leveldb { struct TableBuilder::Rep { + Rep(const Options& opt, WritableFile* f) + : options(opt), + index_block_options(opt), + file(f), + offset(0), + data_block(&options), + index_block(&index_block_options), + num_entries(0), + closed(false), + filter_block(opt.filter_policy == nullptr + ? nullptr + : new FilterBlockBuilder(opt.filter_policy)), + pending_index_entry(false) { + index_block_options.block_restart_interval = 1; + } + Options options; Options index_block_options; WritableFile* file; @@ -44,22 +60,6 @@ struct TableBuilder::Rep { BlockHandle pending_handle; // Handle to add to index block std::string compressed_output; - - Rep(const Options& opt, WritableFile* f) - : options(opt), - index_block_options(opt), - file(f), - offset(0), - data_block(&options), - index_block(&index_block_options), - num_entries(0), - closed(false), - filter_block(opt.filter_policy == nullptr - ? nullptr - : new FilterBlockBuilder(opt.filter_policy)), - pending_index_entry(false) { - index_block_options.block_restart_interval = 1; - } }; TableBuilder::TableBuilder(const Options& options, WritableFile* file) |