Remove copy of pairs from the for range loop (#6514)
Summary: Remove copy of pairs from the for range loop Pull Request resolved: https://github.com/facebook/rocksdb/pull/6514 Test Plan: make check Differential Revision: D20389688 Pulled By: cheng-chang fbshipit-source-id: 1c772091f955be33267514010f3596c61a6f46b5
This commit is contained in:
parent
2d9efc9ab2
commit
6dea7530b5
@ -416,7 +416,7 @@ Status RocksDBOptionsParser::EndSection(
|
||||
return s;
|
||||
}
|
||||
} else if (section == kOptionSectionVersion) {
|
||||
for (const auto pair : opt_map) {
|
||||
for (const auto& pair : opt_map) {
|
||||
if (pair.first == "rocksdb_version") {
|
||||
s = ParseVersionNumber(pair.first, pair.second, 3, db_version);
|
||||
if (!s.ok()) {
|
||||
@ -739,7 +739,7 @@ Status RocksDBOptionsParser::VerifyDBOptions(
|
||||
const DBOptions& base_opt, const DBOptions& persisted_opt,
|
||||
const std::unordered_map<std::string, std::string>* /*opt_map*/,
|
||||
OptionsSanityCheckLevel sanity_check_level) {
|
||||
for (auto pair : db_options_type_info) {
|
||||
for (const auto& pair : db_options_type_info) {
|
||||
if (pair.second.verification == OptionVerificationType::kDeprecated) {
|
||||
// We skip checking deprecated variables as they might
|
||||
// contain random values since they might not be initialized
|
||||
@ -777,7 +777,7 @@ Status RocksDBOptionsParser::VerifyCFOptions(
|
||||
const ColumnFamilyOptions& persisted_opt,
|
||||
const std::unordered_map<std::string, std::string>* persisted_opt_map,
|
||||
OptionsSanityCheckLevel sanity_check_level) {
|
||||
for (auto& pair : cf_options_type_info) {
|
||||
for (const auto& pair : cf_options_type_info) {
|
||||
if (pair.second.verification == OptionVerificationType::kDeprecated) {
|
||||
// We skip checking deprecated variables as they might
|
||||
// contain random values since they might not be initialized
|
||||
|
Loading…
Reference in New Issue
Block a user