diff options
author | Kjell Ahlstedt <kjellahlstedt@gmail.com> | 2020-07-11 12:03:16 +0200 |
---|---|---|
committer | Kjell Ahlstedt <kjellahlstedt@gmail.com> | 2020-07-11 12:03:16 +0200 |
commit | 909b0f150aa52c83e56e379e9ee091c97995784b (patch) | |
tree | 47efe2c6cae81cf703e59d3375964604ca3d3355 /tools | |
parent | 4976714d10dd6cd32b04f358a390fdc38f8bcd2f (diff) | |
download | glibmm-909b0f150aa52c83e56e379e9ee091c97995784b.tar.gz |
gmmproc: _CLASS_BOXEDTYPE, _CLASS_OPAQUE_COPYABLE: Fix move assignment
Add a std::move() to avoid copying.
Fixes #76
Diffstat (limited to 'tools')
-rw-r--r-- | tools/m4/class_boxedtype.m4 | 2 | ||||
-rw-r--r-- | tools/m4/class_opaque_copyable.m4 | 2 |
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; } |