From 65ea4f91b66093f28bdfe6809aebbf9c348c60d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ricardo=20Lu=C3=ADs=20Vaz=20Silva?= Date: Sat, 1 Apr 2023 01:04:43 -0300 Subject: [PATCH] fix TMap move insertion, was using the copy constructor due to a missing std::move --- src/common/utility/tarray.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/common/utility/tarray.h b/src/common/utility/tarray.h index 3d49f18682..feb361bf88 100644 --- a/src/common/utility/tarray.h +++ b/src/common/utility/tarray.h @@ -1128,12 +1128,12 @@ public: Node *n = FindKey(key); if (n != NULL) { - n->Pair.Value = value; + n->Pair.Value = std::move(value); } else { n = NewKey(key); - ::new(&n->Pair.Value) VT(value); + ::new(&n->Pair.Value) VT(std::move(value)); } return n->Pair.Value; }