File tree Expand file tree Collapse file tree 1 file changed +6
-8
lines changed Expand file tree Collapse file tree 1 file changed +6
-8
lines changed Original file line number Diff line number Diff line change @@ -31,19 +31,17 @@ std::size_t goto_statet::increase_generation(
31
31
const ssa_exprt &lhs,
32
32
std::function<std::size_t (const irep_idt &)> fresh_l2_name_provider)
33
33
{
34
- std::size_t n = fresh_l2_name_provider (l1_identifier);
34
+ const std::size_t n = fresh_l2_name_provider (l1_identifier);
35
35
36
- const auto r_opt = level2.current_names .find (l1_identifier);
37
-
38
- if (!r_opt)
36
+ if (const auto r_opt = level2.current_names .find (l1_identifier))
39
37
{
40
- level2.current_names .insert (l1_identifier, std::make_pair (lhs, n));
38
+ std::pair<ssa_exprt, unsigned > copy = r_opt->get ();
39
+ copy.second = narrow<unsigned >(n);
40
+ level2.current_names .replace (l1_identifier, std::move (copy));
41
41
}
42
42
else
43
43
{
44
- std::pair<ssa_exprt, unsigned > copy = r_opt->get ();
45
- copy.second = n;
46
- level2.current_names .replace (l1_identifier, std::move (copy));
44
+ level2.current_names .insert (l1_identifier, std::make_pair (lhs, n));
47
45
}
48
46
49
47
return n;
You can’t perform that action at this time.
0 commit comments