Skip to content

Commit a9549e7

Browse files
Define constants as const
1 parent fa35ccd commit a9549e7

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/goto-instrument/cover_basic_blocks.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ cover_basic_blockst::cover_basic_blockst(const goto_programt &_goto_program)
8989

9090
unsigned cover_basic_blockst::block_of(goto_programt::const_targett t) const
9191
{
92-
block_mapt::const_iterator it = block_map.find(t);
92+
const auto it = block_map.find(t);
9393
INVARIANT(it != block_map.end(), "instruction must be part of a block");
9494
return it->second;
9595
}
@@ -118,7 +118,7 @@ void cover_basic_blockst::select_unique_java_bytecode_indices(
118118

119119
forall_goto_program_instructions(it, goto_program)
120120
{
121-
unsigned block_nr = block_of(it);
121+
const unsigned block_nr = block_of(it);
122122
if(blocks_seen.find(block_nr) != blocks_seen.end())
123123
continue;
124124

@@ -184,7 +184,7 @@ void cover_basic_blockst::report_block_anomalies(
184184
std::set<unsigned> blocks_seen;
185185
forall_goto_program_instructions(it, goto_program)
186186
{
187-
unsigned block_nr = block_of(it);
187+
const unsigned block_nr = block_of(it);
188188
const block_infot &block_info = block_infos.at(block_nr);
189189

190190
if(

0 commit comments

Comments
 (0)