Skip to content

Commit

Permalink
Fix code smells about for loop
Browse files Browse the repository at this point in the history
  • Loading branch information
abitmore committed Mar 22, 2021
1 parent 2c30e20 commit cb488f0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions libraries/app/database_api.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1869,10 +1869,10 @@ vector<extended_liquidity_pool_object> database_api_impl::get_liquidity_pools_by
vector<extended_liquidity_pool_object> results;

results.reserve( limit );
auto pools_end = pools.end();
for ( ; itr != pools_end && results.size() < limit; ++itr )
while( itr != pools.end() && results.size() < limit )
{
results.emplace_back( extend_liquidity_pool( (*itr)(_db), with_stats ) );
++itr;
}

return results;
Expand Down

0 comments on commit cb488f0

Please sign in to comment.