Added a conditional move on return if CXX 11 for polymorphic unique_pointers
This commit is contained in:
parent
a6df5d9526
commit
d2af3eaf8d
3 changed files with 6 additions and 2 deletions
|
|
@ -20,6 +20,9 @@
|
|||
|
||||
#if __cplusplus > 201103L
|
||||
#define CXX14_CONSTEXPR constexpr
|
||||
#define CXX11_MOVE(x) x
|
||||
#else
|
||||
#define CXX14_CONSTEXPR
|
||||
#define CXX11_MOVE(x) std::move(x)
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@
|
|||
*/
|
||||
|
||||
#include "Apan.h"
|
||||
#include "Macros.h"
|
||||
#include "CommonLFO.h"
|
||||
#include "Opcode.h"
|
||||
#include <limits>
|
||||
|
|
@ -108,7 +109,7 @@ namespace fx {
|
|||
}
|
||||
}
|
||||
|
||||
return fx;
|
||||
return CXX11_MOVE(fx);
|
||||
}
|
||||
|
||||
void Apan::computeLfos(float* left, float* right, unsigned nframes)
|
||||
|
|
|
|||
|
|
@ -92,7 +92,7 @@ namespace fx {
|
|||
}
|
||||
}
|
||||
|
||||
return std::move(fx);
|
||||
return CXX11_MOVE(fx);
|
||||
}
|
||||
|
||||
///
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue