utils/xcbutils: reduce atomic refcount inc/decrement

This commit is contained in:
Fushan Wen 2024-09-09 21:42:40 +08:00
parent 5cfe84b23b
commit e5c22cefba
No known key found for this signature in database
GPG key ID: 2E48D1487C91DCAA

View file

@ -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;