+
Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions k4FWCore/include/k4FWCore/DataHandle.h
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,8 @@ template <typename T> const T* DataHandle<T>::get() {
DataObject* dataObjectp = nullptr;
auto sc = m_eds->retrieveObject(DataObjectHandle<DataWrapper<T>>::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<DataWrapper<T>*>(dataObjectp);
if (!m_isGoodType) {
Expand All @@ -142,7 +142,7 @@ template <typename T> const T* DataHandle<T>::get() {
}
}
}
if (LIKELY(m_isGoodType)) {
if (m_isGoodType) {
return static_cast<DataWrapper<T>*>(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
Expand Down
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载