@ -228,7 +228,7 @@ class BlockConstructor: public Constructor {
block_ = nullptr ;
block_ = nullptr ;
BlockBuilder builder ( table_options . block_restart_interval ) ;
BlockBuilder builder ( table_options . block_restart_interval ) ;
for ( const auto kv : kv_map ) {
for ( const auto & kv : kv_map ) {
builder . Add ( kv . first , kv . second ) ;
builder . Add ( kv . first , kv . second ) ;
}
}
// Open the block
// Open the block
@ -352,7 +352,7 @@ class TableConstructor: public Constructor {
TablePropertiesCollectorFactory : : Context : : kUnknownColumnFamily ,
TablePropertiesCollectorFactory : : Context : : kUnknownColumnFamily ,
file_writer_ . get ( ) ) ) ;
file_writer_ . get ( ) ) ) ;
for ( const auto kv : kv_map ) {
for ( const auto & kv : kv_map ) {
if ( convert_to_internal_key_ ) {
if ( convert_to_internal_key_ ) {
ParsedInternalKey ikey ( kv . first , kMaxSequenceNumber , kTypeValue ) ;
ParsedInternalKey ikey ( kv . first , kMaxSequenceNumber , kTypeValue ) ;
std : : string encoded ;
std : : string encoded ;
@ -487,7 +487,7 @@ class MemTableConstructor: public Constructor {
kMaxSequenceNumber , 0 /* column_family_id */ ) ;
kMaxSequenceNumber , 0 /* column_family_id */ ) ;
memtable_ - > Ref ( ) ;
memtable_ - > Ref ( ) ;
int seq = 1 ;
int seq = 1 ;
for ( const auto kv : kv_map ) {
for ( const auto & kv : kv_map ) {
memtable_ - > Add ( seq , kTypeValue , kv . first , kv . second ) ;
memtable_ - > Add ( seq , kTypeValue , kv . first , kv . second ) ;
seq + + ;
seq + + ;
}
}
@ -548,7 +548,7 @@ class DBConstructor: public Constructor {
delete db_ ;
delete db_ ;
db_ = nullptr ;
db_ = nullptr ;
NewDB ( ) ;
NewDB ( ) ;
for ( const auto kv : kv_map ) {
for ( const auto & kv : kv_map ) {
WriteBatch batch ;
WriteBatch batch ;
batch . Put ( kv . first , kv . second ) ;
batch . Put ( kv . first , kv . second ) ;
EXPECT_TRUE ( db_ - > Write ( WriteOptions ( ) , & batch ) . ok ( ) ) ;
EXPECT_TRUE ( db_ - > Write ( WriteOptions ( ) , & batch ) . ok ( ) ) ;
@ -1226,7 +1226,7 @@ class FileChecksumTestHelper {
}
}
Status WriteKVAndFlushTable ( ) {
Status WriteKVAndFlushTable ( ) {
for ( const auto kv : kv_map_ ) {
for ( const auto & kv : kv_map_ ) {
if ( convert_to_internal_key_ ) {
if ( convert_to_internal_key_ ) {
ParsedInternalKey ikey ( kv . first , kMaxSequenceNumber , kTypeValue ) ;
ParsedInternalKey ikey ( kv . first , kMaxSequenceNumber , kTypeValue ) ;
std : : string encoded ;
std : : string encoded ;