From b7a3c4526990d6601ff2cac748ff860cda6bc16d Mon Sep 17 00:00:00 2001 From: vaxerski Date: Fri, 17 Jan 2025 18:21:34 +0100 Subject: core: add LIKELY and UNLIKELY macros helps the compiler optimize --- src/devices/VirtualPointer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/devices') diff --git a/src/devices/VirtualPointer.cpp b/src/devices/VirtualPointer.cpp index 514c8c32..7cfb0631 100644 --- a/src/devices/VirtualPointer.cpp +++ b/src/devices/VirtualPointer.cpp @@ -11,7 +11,7 @@ SP CVirtualPointer::create(SP resour } CVirtualPointer::CVirtualPointer(SP resource) : pointer(resource) { - if (!resource->good()) + if UNLIKELY (!resource->good()) return; listeners.destroy = pointer->events.destroy.registerListener([this](std::any d) { -- cgit v1.2.3