Skip to content

Commit 16d6934

Browse files
author
Daniel Kroening
committed
rvalue variant of code_blockt::add
1 parent b032b00 commit 16d6934

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/util/std_code.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,11 @@ class code_blockt:public codet
138138
copy_to_operands(code);
139139
}
140140

141+
void add(codet &&code)
142+
{
143+
copy_to_operands(std::move(code));
144+
}
145+
141146
void add(codet code, const source_locationt &loc)
142147
{
143148
code.add_source_location() = loc;

0 commit comments

Comments
 (0)