From d8acf203247fa81856227dabad5f8538dba8d23f Mon Sep 17 00:00:00 2001 From: silverqx Date: Fri, 3 May 2024 17:15:05 +0200 Subject: [PATCH] orm bugfix use after move --- include/orm/tiny/concerns/hasattributes.hpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/orm/tiny/concerns/hasattributes.hpp b/include/orm/tiny/concerns/hasattributes.hpp index 433c8ead1..bca39abd2 100644 --- a/include/orm/tiny/concerns/hasattributes.hpp +++ b/include/orm/tiny/concerns/hasattributes.hpp @@ -1381,11 +1381,11 @@ namespace Orm::Tiny::Concerns /* Here we will grab all of the appended, calculated attributes to this model as these attributes are not really in the attributes vector, but are run when we need to serialize or JSON the model for convenience to the coder. */ - for (auto &&key : getSerializableAppends()) + for (const auto &key : getSerializableAppends()) #if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) - attributes.emplaceBack(std::move(key), mutateAccessorAttribute(key)); + attributes.emplaceBack(key, mutateAccessorAttribute(key)); #else - attributes.append({std::move(key), mutateAccessorAttribute(key)}); + attributes.append({key, mutateAccessorAttribute(key)}); #endif return attributes;