Skip to content

Commit

Permalink
Use std::in_place instead of move assignment
Browse files Browse the repository at this point in the history
  • Loading branch information
julic20s committed Dec 3, 2023
1 parent f43596c commit c696718
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/types/redis_bitmap_string.cc
Original file line number Diff line number Diff line change
Expand Up @@ -279,10 +279,10 @@ rocksdb::Status BitmapString::BitfieldReadOnly(const Slice &ns_key, const std::s

if (op.encoding.IsSigned()) {
int64_t value = bitfield.GetSignedBitfield(op.offset, op.encoding.Bits()).GetValue();
rets->emplace_back() = {op.encoding, static_cast<uint64_t>(value)};
rets->emplace_back(std::in_place, op.encoding, static_cast<uint64_t>(value));
} else {
uint64_t value = bitfield.GetUnsignedBitfield(op.offset, op.encoding.Bits()).GetValue();
rets->emplace_back() = {op.encoding, value};
rets->emplace_back(std::in_place, op.encoding, value);
}
}

Expand Down

0 comments on commit c696718

Please sign in to comment.