From c6967185806fc6f78c4bf0c49231278b00f41149 Mon Sep 17 00:00:00 2001 From: julic20s Date: Sun, 3 Dec 2023 21:01:39 +0800 Subject: [PATCH] Use std::in_place instead of move assignment --- src/types/redis_bitmap_string.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/types/redis_bitmap_string.cc b/src/types/redis_bitmap_string.cc index e0f209eaa3e..d9d77114985 100644 --- a/src/types/redis_bitmap_string.cc +++ b/src/types/redis_bitmap_string.cc @@ -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(value)}; + rets->emplace_back(std::in_place, op.encoding, static_cast(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); } }