Skip to content

Commit 3411274

Browse files
committed
Adding move constructors
1 parent fe75b71 commit 3411274

File tree

3 files changed

+37
-0
lines changed

3 files changed

+37
-0
lines changed

src/goto-symex/goto_symex_state.h

+18
Original file line numberDiff line numberDiff line change
@@ -71,10 +71,28 @@ class goto_statet
7171
unsigned remaining_vccs = 0;
7272

7373
/// Constructors
74+
goto_statet() = default;
75+
goto_statet &operator=(const goto_statet &other) = default;
76+
goto_statet &operator=(goto_statet &&other) = default;
77+
goto_statet(const goto_statet &other) = default;
78+
7479
explicit goto_statet(const class goto_symex_statet &s);
7580
explicit goto_statet(const symex_targett::sourcet &_source) : source(_source)
7681
{
7782
}
83+
84+
goto_statet(goto_statet &&other)
85+
: depth(other.depth),
86+
level2(std::move(other.level2)),
87+
value_set(std::move(other.value_set)),
88+
guard(std::move(other.guard)),
89+
source(std::move(other.source)),
90+
propagation(std::move(other.propagation)),
91+
atomic_section_id(other.atomic_section_id),
92+
total_vccs(other.total_vccs),
93+
remaining_vccs(other.remaining_vccs)
94+
{
95+
}
7896
};
7997

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

src/goto-symex/symex_target.h

+9
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

+10
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)