fix move ctor/assignment

This commit is contained in:
Günter Obiltschnig
2020-01-21 19:58:12 +01:00
parent 18adb1e43b
commit eeb64cc340
4 changed files with 50 additions and 48 deletions

View File

@@ -123,7 +123,7 @@ public:
Nullable& assign(C&& value)
/// Assigns a value to the Nullable.
{
_value = value;
_value = std::move(value);
_isNull = false;
return *this;
}
@@ -152,7 +152,7 @@ public:
Nullable& operator = (C&& value)
/// Move-assigns a value to the Nullable.
{
return assign(value);
return assign(std::move(value));
}
Nullable& operator = (const Nullable& other)