Skip to content

Commit 6ba3763

Browse files
tautschnigDaniel Kroening
authored and
Daniel Kroening
committed
Initialise symbol_exprt in the constructor
No need to delay initialisation - do proper RAII.
1 parent 9ceb95b commit 6ba3763

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

src/goto-symex/slice_by_trace.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,6 @@ void symex_slice_by_tracet::slice_by_trace(
3131
{
3232
std::cout << "Slicing by trace...\n";
3333

34-
merge_identifier="goto_symex::\\merge";
35-
merge_symbol=symbol_exprt(typet(ID_bool));
36-
merge_symbol.set_identifier(merge_identifier);
37-
3834
std::vector<exprt> trace_conditions;
3935

4036
size_t length=trace_files.length();

src/goto-symex/slice_by_trace.h

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,11 @@ Author: Alex Groce ([email protected])
1717
class symex_slice_by_tracet
1818
{
1919
public:
20-
explicit symex_slice_by_tracet(const namespacet &_ns):
21-
ns(_ns),
22-
alphabet_parity(false)
20+
explicit symex_slice_by_tracet(const namespacet &_ns)
21+
: ns(_ns),
22+
alphabet_parity(false),
23+
merge_symbol("goto_symex::\\merge", bool_typet())
24+
2325
{
2426
}
2527

0 commit comments

Comments
 (0)