summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKjell Ahlstedt <kjellahlstedt@gmail.com>2020-07-11 11:39:40 +0200
committerKjell Ahlstedt <kjellahlstedt@gmail.com>2020-07-11 11:39:40 +0200
commit08a3cb6e3de39460c1f0fe2fd3c7aec69a198d87 (patch)
tree41c4f17ef55f5112e31e3de4a588e10578253d67
parentaf5e66e0240581a2f712ee907796b3aa8b4d33d6 (diff)
downloadglibmm-08a3cb6e3de39460c1f0fe2fd3c7aec69a198d87.tar.gz
gmmproc: _CLASS_BOXEDTYPE, _CLASS_OPAQUE_COPYABLE: Fix move assignment
Add a std::move() to avoid copying. Fixes #76
-rw-r--r--tools/m4/class_boxedtype.m42
-rw-r--r--tools/m4/class_opaque_copyable.m42
2 files changed, 2 insertions, 2 deletions
diff --git a/tools/m4/class_boxedtype.m4 b/tools/m4/class_boxedtype.m4
index a31f1f0a..4c2092b9 100644
--- a/tools/m4/class_boxedtype.m4
+++ b/tools/m4/class_boxedtype.m4
@@ -146,7 +146,7 @@ __CPPNAME__::__CPPNAME__`'(__CPPNAME__&& other) noexcept
__CPPNAME__& __CPPNAME__::operator=(__CPPNAME__`'&& other) noexcept
{
- __CPPNAME__ temp (other);
+ __CPPNAME__ temp (std::move(other));
swap(temp);
return *this;
}
diff --git a/tools/m4/class_opaque_copyable.m4 b/tools/m4/class_opaque_copyable.m4
index c725a42a..323f10d5 100644
--- a/tools/m4/class_opaque_copyable.m4
+++ b/tools/m4/class_opaque_copyable.m4
@@ -155,7 +155,7 @@ __CPPNAME__::__CPPNAME__`'(__CPPNAME__&& other) noexcept
__CPPNAME__& __CPPNAME__::operator=(__CPPNAME__`'&& other) noexcept
{
- __CPPNAME__ temp (other);
+ __CPPNAME__ temp (std::move(other));
swap(temp);
return *this;
}