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