mirror of
https://github.com/hyprwm/Hyprland.git
synced 2025-08-24 08:23:48 -07:00
core: add LIKELY and UNLIKELY macros
helps the compiler optimize
This commit is contained in:
@@ -35,7 +35,7 @@ void CFractionalScaleProtocol::onGetFractionalScale(CWpFractionalScaleManagerV1*
|
||||
const auto PADDON =
|
||||
m_mAddons.emplace(surface, std::make_unique<CFractionalScaleAddon>(makeShared<CWpFractionalScaleV1>(pMgr->client(), pMgr->version(), id), surface)).first->second.get();
|
||||
|
||||
if (!PADDON->good()) {
|
||||
if UNLIKELY (!PADDON->good()) {
|
||||
m_mAddons.erase(surface);
|
||||
pMgr->noMemory();
|
||||
return;
|
||||
|
Reference in New Issue
Block a user