Skip to content

Commit 5d31d6e

Browse files
committed
Merge pull request opencv#8306 from chacha21:portability
2 parents 8e8da3f + 74abbd0 commit 5d31d6e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

modules/core/src/persistence.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,8 @@
6767
# define _FILE_OFFSET_BITS 0
6868
# endif
6969
# include <zlib.h>
70+
#else
71+
typedef void* gzFile;
7072
#endif
7173

7274
/****************************************************************************************\
@@ -7686,7 +7688,7 @@ std::string base64::make_base64_header(const char * dt)
76867688
bool base64::read_base64_header(std::vector<char> const & header, std::string & dt)
76877689
{
76887690
std::istringstream iss(header.data());
7689-
return static_cast<bool>(iss >> dt);
7691+
return !!(iss >> dt);//the "std::basic_ios::operator bool" differs between C++98 and C++11. The "double not" syntax is portable and covers both cases with equivalent meaning
76907692
}
76917693

76927694
/****************************************************************************

0 commit comments

Comments
 (0)