Skip to content

Commit ca9cb4a

Browse files
author
Daniel Kroening
committed
remove USE_MOVE define
We no longer consider compilation with C++98.
1 parent d3d19f9 commit ca9cb4a

File tree

1 file changed

+1
-14
lines changed

1 file changed

+1
-14
lines changed

src/util/irep.h

+1-14
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ Author: Daniel Kroening, [email protected]
1919

2020
#define SHARING
2121
// #define HASH_CODE
22-
#define USE_MOVE
2322
// #define NAMED_SUB_IS_FORWARD_LIST
2423

2524
#ifdef NAMED_SUB_IS_FORWARD_LIST
@@ -169,19 +168,13 @@ class irept
169168
bool is_nil() const { return id()==ID_nil; }
170169
bool is_not_nil() const { return id()!=ID_nil; }
171170

172-
#if !defined(USE_MOVE) || !defined(SHARING)
171+
#if !defined(SHARING)
173172
explicit irept(const irep_idt &_id)
174-
#ifdef SHARING
175-
:data(&empty_d)
176-
#endif
177173
{
178174
id(_id);
179175
}
180176

181177
irept(const irep_idt &_id, const named_subt &_named_sub, const subt &_sub)
182-
#ifdef SHARING
183-
: data(&empty_d)
184-
#endif
185178
{
186179
id(_id);
187180
get_named_sub() = _named_sub;
@@ -218,7 +211,6 @@ class irept
218211
}
219212
}
220213

221-
#ifdef USE_MOVE
222214
// Copy from rvalue reference.
223215
// Note that this does avoid a branch compared to the
224216
// standard copy constructor above.
@@ -229,7 +221,6 @@ class irept
229221
#endif
230222
irep.data=&empty_d;
231223
}
232-
#endif
233224

234225
irept &operator=(const irept &irep)
235226
{
@@ -249,7 +240,6 @@ class irept
249240
return *this;
250241
}
251242

252-
#ifdef USE_MOVE
253243
// Note that the move assignment operator does avoid
254244
// three branches compared to standard operator above.
255245
irept &operator=(irept &&irep)
@@ -261,7 +251,6 @@ class irept
261251
std::swap(data, irep.data);
262252
return *this;
263253
}
264-
#endif
265254

266255
~irept()
267256
{
@@ -393,7 +382,6 @@ class irept
393382

394383
dt() = default;
395384

396-
#ifdef USE_MOVE
397385
explicit dt(irep_idt _data) : data(std::move(_data))
398386
{
399387
}
@@ -404,7 +392,6 @@ class irept
404392
sub(std::move(_sub))
405393
{
406394
}
407-
#endif
408395
};
409396

410397
protected:

0 commit comments

Comments
 (0)