core: add LIKELY and UNLIKELY macros
helps the compiler optimize
This commit is contained in:
parent
2bad73354a
commit
b7a3c45269
58 changed files with 395 additions and 396 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue