mirror of
https://gitee.com/an-tao/drogon.git
synced 2024-11-29 18:27:43 +08:00
Fix reserve bug (#1144)
This commit is contained in:
parent
e2842c9de5
commit
29732a94ef
@ -1663,7 +1663,7 @@ void [[className]]::get{%relationshipClassName%}(const DbClientPtr &clientPtr,
|
||||
<< *{%nameTransform(relationship.originalKey(), false)%}_
|
||||
>> [rcb = std::move(rcb)](const Result &r){
|
||||
std::vector<{%relationshipClassName%}> ret;
|
||||
ret.reserve(ret.size());
|
||||
ret.reserve(r.size());
|
||||
for (auto const &row : r)
|
||||
{
|
||||
ret.emplace_back({%relationshipClassName%}(row));
|
||||
@ -1717,7 +1717,7 @@ void [[className]]::get{%relationshipClassName%}(const DbClientPtr &clientPtr,
|
||||
<< *{%nameTransform(relationship.originalKey(), false)%}_
|
||||
>> [rcb = std::move(rcb)](const Result &r){
|
||||
std::vector<std::pair<{%relationshipClassName%},{%pivotTableClassName%}>> ret;
|
||||
ret.reserve(ret.size());
|
||||
ret.reserve(r.size());
|
||||
for (auto const &row : r)
|
||||
{
|
||||
ret.emplace_back(std::pair<{%relationshipClassName%},{%pivotTableClassName%}>(
|
||||
|
Loading…
Reference in New Issue
Block a user