From 18fd451680c49ba15a623d6c693e24b3be414a5d Mon Sep 17 00:00:00 2001 From: jmcarcell Date: Thu, 27 Jul 2023 18:59:18 +0200 Subject: [PATCH] Remove LIKELY and UNLIKELY --- k4FWCore/include/k4FWCore/DataHandle.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/k4FWCore/include/k4FWCore/DataHandle.h b/k4FWCore/include/k4FWCore/DataHandle.h index 99285dde..5871efc0 100644 --- a/k4FWCore/include/k4FWCore/DataHandle.h +++ b/k4FWCore/include/k4FWCore/DataHandle.h @@ -131,8 +131,8 @@ template const T* DataHandle::get() { DataObject* dataObjectp = nullptr; auto sc = m_eds->retrieveObject(DataObjectHandle>::fullKey().key(), dataObjectp); - if (LIKELY(sc.isSuccess())) { - if (UNLIKELY(!m_isGoodType && !m_isCollection)) { + if (sc.isSuccess()) { + if (!m_isGoodType && !m_isCollection) { // only do this once (if both are false after this, we throw exception) m_isGoodType = nullptr != dynamic_cast*>(dataObjectp); if (!m_isGoodType) { @@ -142,7 +142,7 @@ template const T* DataHandle::get() { } } } - if (LIKELY(m_isGoodType)) { + if (m_isGoodType) { return static_cast*>(dataObjectp)->getData(); } else if (m_isCollection) { // The reader does not know the specific type of the collection. So we need a reinterpret_cast if the handle was