From e5c22cefba59eb6a53c75e4e4c503326a5e9616c Mon Sep 17 00:00:00 2001 From: Fushan Wen Date: Mon, 9 Sep 2024 21:42:40 +0800 Subject: [PATCH] utils/xcbutils: reduce atomic refcount inc/decrement --- src/utils/xcbutils.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/utils/xcbutils.h b/src/utils/xcbutils.h index 71a70cc424..7674ef2538 100644 --- a/src/utils/xcbutils.h +++ b/src/utils/xcbutils.h @@ -488,12 +488,12 @@ public: class Atom { public: - explicit Atom(const QByteArray &name, bool onlyIfExists = false, xcb_connection_t *c = connection()) + explicit Atom(QByteArray &&name, bool onlyIfExists = false, xcb_connection_t *c = connection()) : m_connection(c) , m_retrieved(false) , m_cookie(xcb_intern_atom_unchecked(m_connection, onlyIfExists, name.length(), name.constData())) , m_atom(XCB_ATOM_NONE) - , m_name(name) + , m_name(std::move(name)) { } Atom() = delete;