From 360eb8bcee5e04cb7ab125d53ab22fd9a0bb49c2 Mon Sep 17 00:00:00 2001 From: Wouter Deconinck Date: Fri, 10 Nov 2023 20:47:20 +0000 Subject: [PATCH] fix: remove (UN)LIKELY (gaudi!1227, gaudi!1307, v37.0 API change) --- JugBase/JugBase/DataHandle.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/JugBase/JugBase/DataHandle.h b/JugBase/JugBase/DataHandle.h index 039375d..786a2ad 100644 --- a/JugBase/JugBase/DataHandle.h +++ b/JugBase/JugBase/DataHandle.h @@ -144,8 +144,8 @@ 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) { @@ -155,7 +155,7 @@ 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