summaryrefslogtreecommitdiff
path: root/src/protocols/RelativePointer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/protocols/RelativePointer.cpp')
-rw-r--r--src/protocols/RelativePointer.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/protocols/RelativePointer.cpp b/src/protocols/RelativePointer.cpp
index b7cf75c6..842af894 100644
--- a/src/protocols/RelativePointer.cpp
+++ b/src/protocols/RelativePointer.cpp
@@ -4,7 +4,7 @@
#include <algorithm>
CRelativePointer::CRelativePointer(SP<CZwpRelativePointerV1> resource_) : resource(resource_) {
- if (!resource_->resource())
+ if UNLIKELY (!resource_->resource())
return;
pClient = resource->client();
@@ -50,7 +50,7 @@ void CRelativePointerProtocol::onGetRelativePointer(CZwpRelativePointerManagerV1
const auto CLIENT = pMgr->client();
const auto RESOURCE = m_vRelativePointers.emplace_back(std::make_unique<CRelativePointer>(makeShared<CZwpRelativePointerV1>(CLIENT, pMgr->version(), id))).get();
- if (!RESOURCE->good()) {
+ if UNLIKELY (!RESOURCE->good()) {
pMgr->noMemory();
m_vRelativePointers.pop_back();
return;