Skip to content

Commit

Permalink
Fix issue 289, C++17 compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
nporcino-pixar authored and meshula committed Nov 21, 2019
1 parent d778a0b commit 780c223
Showing 1 changed file with 1 addition and 14 deletions.
15 changes: 1 addition & 14 deletions OpenEXR/IlmImf/ImfAttribute.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ Attribute::~Attribute () {}

namespace {

struct NameCompare: std::binary_function <const char *, const char *, bool>
struct NameCompare
{
bool
operator () (const char *x, const char *y) const
Expand All @@ -88,21 +88,8 @@ class LockedTypeMap: public TypeMap
LockedTypeMap &
typeMap ()
{
// c++11 requires thread-safe static variable initialization
#if __cplusplus >= 201103L
static LockedTypeMap tMap;
return tMap;
#else
static Mutex criticalSection;
Lock lock (criticalSection);

static LockedTypeMap* typeMap = 0;

if (typeMap == 0)
typeMap = new LockedTypeMap ();

return *typeMap;
#endif
}


Expand Down

0 comments on commit 780c223

Please sign in to comment.