Skip to content

Commit

Permalink
ORM:Avoid unnecessary copies when returning search results (#2237)
Browse files Browse the repository at this point in the history
  • Loading branch information
an-tao authored Jan 2, 2025
1 parent 38dd5fe commit 152a69f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions orm_lib/inc/drogon/orm/Mapper.h
Original file line number Diff line number Diff line change
Expand Up @@ -1053,9 +1053,9 @@ inline void Mapper<T>::findBy(const Criteria &criteria,
std::vector<T> ret;
for (auto const &row : r)
{
ret.push_back(T(row));
ret.emplace_back(row);
}
rcb(ret);
rcb(std::move(ret));
};
binder >> ecb;
}
Expand Down

0 comments on commit 152a69f

Please sign in to comment.