mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-18 00:54:19 +00:00
Created c++11 move constructors and operator= methods for a bunch of classes (only enabled for c++11 compilers, of course)
This commit is contained in:
parent
2c328dfedc
commit
ffc2f5d40e
46 changed files with 629 additions and 39 deletions
|
|
@ -122,6 +122,19 @@ Value& Value::operator= (const Value& other)
|
|||
return *this;
|
||||
}
|
||||
|
||||
#if JUCE_COMPILER_SUPPORTS_MOVE_SEMANTICS
|
||||
Value::Value (Value&& other) noexcept
|
||||
: value (static_cast <ReferenceCountedObjectPtr <ValueSource>&&> (other.value))
|
||||
{
|
||||
}
|
||||
|
||||
Value& Value::operator= (Value&& other) noexcept
|
||||
{
|
||||
value = static_cast <ReferenceCountedObjectPtr <ValueSource>&&> (other.value);
|
||||
return *this;
|
||||
}
|
||||
#endif
|
||||
|
||||
Value::~Value()
|
||||
{
|
||||
if (listeners.size() > 0)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue