Skip to content

Commit

Permalink
orm bugfix use after move
Browse files Browse the repository at this point in the history
  • Loading branch information
silverqx committed May 3, 2024
1 parent 8e77d09 commit d8acf20
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions include/orm/tiny/concerns/hasattributes.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit d8acf20

Please sign in to comment.