Skip to content

Commit 14f2bf2

Browse files
Define constants as const
1 parent 4150aaa commit 14f2bf2

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
@@ -95,7 +95,7 @@ cover_basic_blockst::cover_basic_blockst(const goto_programt &_goto_program)
9595

9696
unsigned cover_basic_blockst::block_of(goto_programt::const_targett t) const
9797
{
98-
block_mapt::const_iterator it = block_map.find(t);
98+
const auto it = block_map.find(t);
9999
INVARIANT(it != block_map.end(), "instruction must be part of a block");
100100
return it->second;
101101
}
@@ -124,7 +124,7 @@ void cover_basic_blockst::select_unique_java_bytecode_indices(
124124

125125
forall_goto_program_instructions(it, goto_program)
126126
{
127-
unsigned block_nr = block_of(it);
127+
const unsigned block_nr = block_of(it);
128128
if(blocks_seen.find(block_nr) != blocks_seen.end())
129129
continue;
130130

@@ -190,7 +190,7 @@ void cover_basic_blockst::report_block_anomalies(
190190
std::set<unsigned> blocks_seen;
191191
forall_goto_program_instructions(it, goto_program)
192192
{
193-
unsigned block_nr = block_of(it);
193+
const unsigned block_nr = block_of(it);
194194
const block_infot &block_info = block_infos.at(block_nr);
195195

196196
if(

0 commit comments

Comments
 (0)