diff --git a/OpenEXR/IlmImfTest/testCompositeDeepScanLine.cpp b/OpenEXR/IlmImfTest/testCompositeDeepScanLine.cpp index 39547508be..190c82c3de 100644 --- a/OpenEXR/IlmImfTest/testCompositeDeepScanLine.cpp +++ b/OpenEXR/IlmImfTest/testCompositeDeepScanLine.cpp @@ -126,7 +126,7 @@ class data data() : _inserting_result(false),_started(false) { - if(typeid(T)==typeid(half)) + if(typeid(T).hash_code()==typeid(half).hash_code()) { _type = OPENEXR_IMF_NAMESPACE::HALF; } diff --git a/PyIlmBase/PyIex/PyIexTypeTranslator.h b/PyIlmBase/PyIex/PyIexTypeTranslator.h index f613474f38..1ebea26beb 100644 --- a/PyIlmBase/PyIex/PyIexTypeTranslator.h +++ b/PyIlmBase/PyIex/PyIexTypeTranslator.h @@ -240,7 +240,7 @@ template typename TypeTranslator::ClassDesc * TypeTranslator::findClassDesc (ClassDesc *cd) { - if (cd->typeInfo() == typeid (T)) + if (cd->typeInfo().hash_code() == typeid (T).hash_code()) return cd; for (int i = 0; i < cd->numDerivedClasses(); ++i) @@ -259,7 +259,7 @@ template const typename TypeTranslator::ClassDesc * TypeTranslator::findClassDesc (const ClassDesc *cd) const { - if (cd->typeInfo() == typeid (T)) + if (cd->typeInfo().hash_code() == typeid (T).hash_code()) return cd; for (int i = 0; i < cd->numDerivedClasses(); ++i)