Skip to content

Commit fa9487f

Browse files
committed
Adding move constructors
1 parent a9ad534 commit fa9487f

File tree

3 files changed

+38
-0
lines changed

3 files changed

+38
-0
lines changed

src/goto-symex/goto_symex_state.h

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,10 +73,29 @@ class goto_statet
7373
unsigned remaining_vccs = 0;
7474

7575
/// Constructors
76+
goto_statet() = default;
77+
goto_statet &operator=(const goto_statet &other) = default;
78+
goto_statet &operator=(goto_statet &&other) = default;
79+
goto_statet(const goto_statet &other) = default;
80+
7681
explicit goto_statet(const class goto_symex_statet &s);
7782
explicit goto_statet(const symex_targett::sourcet &_source) : source(_source)
7883
{
7984
}
85+
86+
goto_statet(goto_statet &&other)
87+
: depth(other.depth),
88+
level2(std::move(other.level2)),
89+
value_set(std::move(other.value_set)),
90+
guard(std::move(other.guard)),
91+
source(std::move(other.source)),
92+
propagation(std::move(other.propagation)),
93+
atomic_section_id(other.atomic_section_id),
94+
safe_pointers(other.safe_pointers),
95+
total_vccs(other.total_vccs),
96+
remaining_vccs(other.remaining_vccs)
97+
{
98+
}
8099
};
81100

82101
// stack frames -- these are used for function calls and

src/goto-symex/symex_target.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,15 @@ class symex_targett
5353
pc(_goto_program.instructions.begin())
5454
{
5555
}
56+
57+
sourcet(sourcet &&other) noexcept
58+
: thread_nr(other.thread_nr), function_id(other.function_id), pc(other.pc)
59+
{
60+
}
61+
62+
sourcet(const sourcet &other) = default;
63+
sourcet &operator=(const sourcet &other) = default;
64+
sourcet &operator=(sourcet &&other) = default;
5665
};
5766

5867
enum class assignment_typet

src/pointer-analysis/value_set.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,16 @@ class value_sett
4545
{
4646
}
4747

48+
value_sett(value_sett &&other)
49+
: location_number(other.location_number), values(std::move(other.values))
50+
{
51+
}
52+
53+
value_sett(const value_sett &other) = default;
54+
55+
value_sett &operator=(const value_sett &other) = default;
56+
value_sett &operator=(value_sett &&other) = default;
57+
4858
virtual ~value_sett() = default;
4959

5060
static bool field_sensitive(const irep_idt &id, const typet &type);

0 commit comments

Comments
 (0)