summaryrefslogtreecommitdiffstats
path: root/src/gui/text/qfontengine_p.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/text/qfontengine_p.h')
-rw-r--r--src/gui/text/qfontengine_p.h9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/gui/text/qfontengine_p.h b/src/gui/text/qfontengine_p.h
index a81e877677..5d73e2cf8e 100644
--- a/src/gui/text/qfontengine_p.h
+++ b/src/gui/text/qfontengine_p.h
@@ -304,14 +304,11 @@ public:
explicit Holder(void *p, qt_destroy_func_t d) : ptr(p), destroy_func(d) {}
~Holder() { if (ptr && destroy_func) destroy_func(ptr); }
Holder(Holder &&other) noexcept
- : ptr(other.ptr),
- destroy_func(other.destroy_func)
+ : ptr(qExchange(other.ptr, nullptr)),
+ destroy_func(qExchange(other.destroy_func, nullptr))
{
- other.ptr = nullptr;
- other.destroy_func = nullptr;
}
- Holder &operator=(Holder &&other) noexcept
- { swap(other); return *this; }
+ QT_MOVE_ASSIGNMENT_OPERATOR_IMPL_VIA_PURE_SWAP(Holder)
void swap(Holder &other) noexcept
{