Skip to content

Commit 3ef6759

Browse files
Rearrange cover_basic_blocks header
Put type definition at the beggining. Remove typedef that are used only once (they hide what the type actually is). Use private membres instead of protected.
1 parent 14f2bf2 commit 3ef6759

File tree

1 file changed

+4
-9
lines changed

1 file changed

+4
-9
lines changed

src/goto-instrument/cover_basic_blocks.h

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,14 @@ class cover_basic_blockst
2323
public:
2424
struct block_infot
2525
{
26-
/// the program location to instrument for this block
26+
/// the program instruction representative for this block
2727
optionalt<goto_programt::const_targett> representative_inst;
2828

2929
/// the source location representative for this block
3030
// (we need a separate copy of source locations because we attach
3131
// the line number ranges to them)
3232
source_locationt source_location;
3333

34-
// map block numbers to source code locations
3534
/// the set of lines belonging to this block
3635
std::unordered_set<unsigned> lines;
3736
};
@@ -72,14 +71,10 @@ class cover_basic_blockst
7271
/// Outputs the list of blocks
7372
void output(std::ostream &out) const;
7473

75-
protected:
74+
private:
7675
// map program locations to block numbers
77-
typedef std::map<goto_programt::const_targett, unsigned> block_mapt;
78-
block_mapt block_map;
79-
80-
typedef std::vector<block_infot> block_infost;
81-
block_infost block_infos;
82-
76+
std::map<goto_programt::const_targett, unsigned> block_map;
77+
std::vector<block_infot> block_infos;
8378
};
8479

8580
#endif // CPROVER_GOTO_INSTRUMENT_COVER_BASIC_BLOCKS_H

0 commit comments

Comments
 (0)