From 2af46f10112f91298a66d513269705fe609a2461 Mon Sep 17 00:00:00 2001 From: darionyaphet Date: Wed, 30 Sep 2020 20:23:02 -0700 Subject: [PATCH] Move break into block (#7468) Summary: Pull Request resolved: https://github.com/facebook/rocksdb/pull/7468 Reviewed By: riversand963 Differential Revision: D24028736 Pulled By: ajkr fbshipit-source-id: bd2b4b8d069491a16373d3d2705fddf7ebfe6723 --- table/block_based/index_builder.cc | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/table/block_based/index_builder.cc b/table/block_based/index_builder.cc index a2c074c76..87585562d 100644 --- a/table/block_based/index_builder.cc +++ b/table/block_based/index_builder.cc @@ -37,7 +37,8 @@ IndexBuilder* IndexBuilder::CreateIndexBuilder( comparator, table_opt.index_block_restart_interval, table_opt.format_version, use_value_delta_encoding, table_opt.index_shortening, /* include_first_key */ false); - } break; + break; + } case BlockBasedTableOptions::kHashSearch: { // Currently kHashSearch is incompatible with index_block_restart_interval // > 1 @@ -46,20 +47,24 @@ IndexBuilder* IndexBuilder::CreateIndexBuilder( comparator, int_key_slice_transform, table_opt.index_block_restart_interval, table_opt.format_version, use_value_delta_encoding, table_opt.index_shortening); - } break; + break; + } case BlockBasedTableOptions::kTwoLevelIndexSearch: { result = PartitionedIndexBuilder::CreateIndexBuilder( comparator, use_value_delta_encoding, table_opt); - } break; + break; + } case BlockBasedTableOptions::kBinarySearchWithFirstKey: { result = new ShortenedIndexBuilder( comparator, table_opt.index_block_restart_interval, table_opt.format_version, use_value_delta_encoding, table_opt.index_shortening, /* include_first_key */ true); - } break; + break; + } default: { assert(!"Do not recognize the index type "); - } break; + break; + } } return result; }