Skip to content

Commit 3364e8f

Browse files
committed
Fix compatibility with GNU g++ 6.3 compiler.
1 parent 3de604c commit 3364e8f

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

source/base/image/openexr.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ class POV_EXR_OStream : public Imf::OStream
101101

102102
void write(const char *c, int n)
103103
{
104-
if(os.write(c, n) == false)
104+
if(!os.write(c, n))
105105
throw POV_EXCEPTION(kFileDataErr, "Error while writing EXR output");
106106
}
107107

@@ -115,7 +115,7 @@ class POV_EXR_OStream : public Imf::OStream
115115

116116
void seekp(Int64 pos)
117117
{
118-
if(os.seekg((unsigned long)pos) == false)
118+
if(!os.seekg((unsigned long)pos))
119119
throw POV_EXCEPTION(kFileDataErr, "Error when writing EXR output");
120120
}
121121
private:
@@ -142,7 +142,7 @@ class POV_EXR_IStream : public Imf::IStream
142142

143143
bool read(char *c, int n)
144144
{
145-
if(is.read(c, n) == false)
145+
if(!is.read(c, n))
146146
throw POV_EXCEPTION(kFileDataErr, "Error while reading EXR file");
147147
return (is.tellg() < fsize);
148148
}
@@ -157,7 +157,7 @@ class POV_EXR_IStream : public Imf::IStream
157157

158158
void seekg(Int64 pos)
159159
{
160-
if(is.seekg((unsigned long)pos) == false)
160+
if(!is.seekg((unsigned long)pos))
161161
throw POV_EXCEPTION(kFileDataErr, "Error while reading EXR file");
162162
}
163163
private:

0 commit comments

Comments
 (0)