Skip to content

Commit aa1b031

Browse files
committed
get rid of warning C4800 under VS2010
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
1 parent a347569 commit aa1b031

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

modules/core/src/persistence.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7697,7 +7697,7 @@ std::string base64::make_base64_header(const char * dt)
76977697
bool base64::read_base64_header(std::vector<char> const & header, std::string & dt)
76987698
{
76997699
std::istringstream iss(header.data());
7700-
return static_cast<bool>(iss >> dt);
7700+
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
77017701
}
77027702

77037703
/****************************************************************************

0 commit comments

Comments
 (0)