Skip to content

Commit a5b0172

Browse files
nporcino-pixarhjmallon
authored andcommitted
Fix issue 289, C++17 compatibility
1 parent b97f7ef commit a5b0172

File tree

1 file changed

+1
-14
lines changed

1 file changed

+1
-14
lines changed

OpenEXR/IlmImf/ImfAttribute.cpp

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ Attribute::~Attribute () {}
6363

6464
namespace {
6565

66-
struct NameCompare: std::binary_function <const char *, const char *, bool>
66+
struct NameCompare
6767
{
6868
bool
6969
operator () (const char *x, const char *y) const
@@ -88,21 +88,8 @@ class LockedTypeMap: public TypeMap
8888
LockedTypeMap &
8989
typeMap ()
9090
{
91-
// c++11 requires thread-safe static variable initialization
92-
#if __cplusplus >= 201103L
9391
static LockedTypeMap tMap;
9492
return tMap;
95-
#else
96-
static Mutex criticalSection;
97-
Lock lock (criticalSection);
98-
99-
static LockedTypeMap* typeMap = 0;
100-
101-
if (typeMap == 0)
102-
typeMap = new LockedTypeMap ();
103-
104-
return *typeMap;
105-
#endif
10693
}
10794

10895

0 commit comments

Comments
 (0)