Apply suggestions from code review
Use emplace_back instead of push_back Co-Authored-By: Jingyu Zhou <jingyuzhou@gmail.com>
This commit is contained in:
parent
aa1bc0087e
commit
7e5b5a0536
|
@ -597,7 +597,8 @@ Version MultiVersionTransaction::getCommittedVersion() {
|
|||
|
||||
void MultiVersionTransaction::setOption(FDBTransactionOptions::Option option, Optional<StringRef> value) {
|
||||
if(MultiVersionApi::apiVersionAtLeast(610) && FDBTransactionOptions::optionInfo[option].persistent) {
|
||||
persistentOptions.push_back(std::make_pair(option, value.castTo<Standalone<StringRef>>()));
|
||||
persistentOptions.emplace_back(option, value.castTo<Standalone<StringRef>>());
|
||||
|
||||
}
|
||||
auto tr = getTransaction();
|
||||
if(tr.transaction) {
|
||||
|
|
|
@ -1762,7 +1762,8 @@ void ReadYourWritesTransaction::setOption( FDBTransactionOptions::Option option,
|
|||
setOptionImpl(option, value);
|
||||
|
||||
if(FDBTransactionOptions::optionInfo[option].persistent) {
|
||||
persistentOptions.push_back(std::make_pair(option, value.castTo<Standalone<StringRef>>()));
|
||||
persistentOptions.emplace_back(option, value.castTo<Standalone<StringRef>>());
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue