Skip to content

Commit 8d3559b

Browse files
author
Lukasz A.J. Wrona
committed
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
1 parent 8e573ce commit 8d3559b

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

jbmc/src/java_bytecode/java_bytecode_parser.cpp

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -653,15 +653,9 @@ void java_bytecode_parsert::rconstant_pool()
653653

654654
constant_pool.resize(constant_pool_count);
655655

656-
for(constant_poolt::iterator
657-
it=constant_pool.begin();
658-
it!=constant_pool.end();
656+
for(auto it = std::next(constant_pool.begin()); it != constant_pool.end();
659657
it++)
660658
{
661-
// the first entry isn't used
662-
if(it==constant_pool.begin())
663-
continue;
664-
665659
it->tag = read<u1>();
666660

667661
switch(it->tag)

0 commit comments

Comments
 (0)