summaryrefslogtreecommitdiff
path: root/src/protocols/WaylandProtocol.cpp
diff options
context:
space:
mode:
authorvaxerski <vaxry@vaxry.net>2025-01-17 18:21:34 +0100
committervaxerski <vaxry@vaxry.net>2025-01-17 18:56:39 +0100
commitb7a3c4526990d6601ff2cac748ff860cda6bc16d (patch)
tree425c6afa0bc35f7f370a666bd7a81214a6e9475a /src/protocols/WaylandProtocol.cpp
parent2bad73354a5dbb9be8ba9a39b6238017a216a25b (diff)
core: add LIKELY and UNLIKELY macros
helps the compiler optimize
Diffstat (limited to 'src/protocols/WaylandProtocol.cpp')
-rw-r--r--src/protocols/WaylandProtocol.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/protocols/WaylandProtocol.cpp b/src/protocols/WaylandProtocol.cpp
index 5c6a4a56..7fef5179 100644
--- a/src/protocols/WaylandProtocol.cpp
+++ b/src/protocols/WaylandProtocol.cpp
@@ -20,7 +20,7 @@ void IWaylandProtocol::onDisplayDestroy() {
IWaylandProtocol::IWaylandProtocol(const wl_interface* iface, const int& ver, const std::string& name) :
m_szName(name), m_pGlobal(wl_global_create(g_pCompositor->m_sWLDisplay, iface, ver, this, &bindManagerInternal)) {
- if (!m_pGlobal) {
+ if UNLIKELY (!m_pGlobal) {
LOGM(ERR, "could not create a global [{}]", m_szName);
return;
}