From aa1b0312743cbcea3ab92f2b12567766216aec1b Mon Sep 17 00:00:00 2001 From: chacha21 Date: Thu, 2 Mar 2017 16:56:20 +0100 Subject: [PATCH] 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 --- modules/core/src/persistence.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/core/src/persistence.cpp b/modules/core/src/persistence.cpp index 946875f5b1..5faede3ae8 100644 --- a/modules/core/src/persistence.cpp +++ b/modules/core/src/persistence.cpp @@ -7697,7 +7697,7 @@ std::string base64::make_base64_header(const char * dt) bool base64::read_base64_header(std::vector const & header, std::string & dt) { std::istringstream iss(header.data()); - return static_cast(iss >> dt); + 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 } /****************************************************************************