File tree Expand file tree Collapse file tree 3 files changed +13
-19
lines changed Expand file tree Collapse file tree 3 files changed +13
-19
lines changed Original file line number Diff line number Diff line change @@ -28,8 +28,14 @@ class trans_tracet
28
28
exprt lhs;
29
29
exprt rhs;
30
30
source_locationt location;
31
-
32
- assignmentt ():location(source_locationt::nil())
31
+
32
+ assignmentt (
33
+ exprt __lhs,
34
+ exprt __rhs,
35
+ source_locationt __location = source_locationt::nil())
36
+ : lhs(std::move(__lhs)),
37
+ rhs (std::move(__rhs)),
38
+ location(std::move(__location))
33
39
{
34
40
}
35
41
};
Original file line number Diff line number Diff line change @@ -144,15 +144,9 @@ trans_tracet compute_trans_trace(
144
144
145
145
value=ch+value;
146
146
}
147
-
148
- state.assignments .push_back (trans_tracet::statet::assignmentt ());
149
147
150
- trans_tracet::statet::assignmentt &assignment=
151
- state.assignments .back ();
152
-
153
- assignment.lhs =symbol.symbol_expr ();
154
- assignment.rhs =bitstring_to_expr (value, var.type );
155
- assignment.location .make_nil ();
148
+ state.assignments .emplace_back (
149
+ symbol.symbol_expr (), bitstring_to_expr (value, var.type ));
156
150
}
157
151
158
152
// check the property
Original file line number Diff line number Diff line change @@ -62,10 +62,7 @@ trans_tracet compute_trans_trace(
62
62
{
63
63
if (symbol.value .is_constant ())
64
64
{
65
- trans_tracet::statet::assignmentt assignment;
66
- assignment.rhs = symbol.value ;
67
- assignment.lhs = symbol.symbol_expr ();
68
- state.assignments .push_back (assignment);
65
+ state.assignments .emplace_back (symbol.symbol_expr (), symbol.value );
69
66
}
70
67
}
71
68
else
@@ -79,11 +76,8 @@ trans_tracet compute_trans_trace(
79
76
if (value_expr == indexed_symbol_expr)
80
77
value_expr = nil_exprt ();
81
78
82
- trans_tracet::statet::assignmentt assignment;
83
- assignment.rhs .swap (value_expr);
84
- assignment.lhs = symbol.symbol_expr ();
85
-
86
- state.assignments .push_back (assignment);
79
+ state.assignments .emplace_back (
80
+ symbol.symbol_expr (), std::move (value_expr));
87
81
}
88
82
}
89
83
}
You can’t perform that action at this time.
0 commit comments