Skip the first iteration of the loop with next() rather than with an if

Cannot use for_each/ranged-for because loop performs a pairwise operation
This commit is contained in:
Lukasz A.J. Wrona 2019-07-26 11:28:11 +01:00
parent 8e573ce9b2
commit 8d3559bba0
1 changed files with 1 additions and 7 deletions

View File

@ -653,15 +653,9 @@ void java_bytecode_parsert::rconstant_pool()
constant_pool.resize(constant_pool_count);
for(constant_poolt::iterator
it=constant_pool.begin();
it!=constant_pool.end();
for(auto it = std::next(constant_pool.begin()); it != constant_pool.end();
it++)
{
// the first entry isn't used
if(it==constant_pool.begin())
continue;
it->tag = read<u1>();
switch(it->tag)