Skip to content

Commit

Permalink
Fix includes and test to match ImfAttribute
Browse files Browse the repository at this point in the history
Signed-off-by: Kimball Thurston <kdt3rd@gmail.com>
  • Loading branch information
kdt3rd committed Feb 16, 2021
1 parent a700d9c commit 1b2b519
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/lib/OpenEXRUtil/ImfImageChannel.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@
#include <ImathBox.h>
#include <half.h>

#include <typeinfo>
#include <cstring>

OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_ENTER

class ImageLevel;
Expand Down Expand Up @@ -149,9 +152,7 @@ static U *dynamic_cast_channel (ImageChannel *a)
const auto &aid = typeid(*a);
const auto &uid = typeid(U);
// check the fast tests first before comparing names...
if (aid == uid ||
(aid.hash_code() == uid.hash_code() &&
aid.name() == uid.name()))
if (aid == uid || !strcmp(aid.name(), uid.name()))
{
return static_cast<U *>( a );
}
Expand Down

0 comments on commit 1b2b519

Please sign in to comment.