From: mnt Date: Wed, 20 Sep 2017 12:14:00 +0000 (+0300) Subject: Fix compilation errors using gcc 5 relating to explicit stream::operator bool() X-Git-Tag: V8_4_0b1~2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=0820fb3497941402ec4abf5c17027b29abc2ac56;p=plugins%2Fgmshplugin.git Fix compilation errors using gcc 5 relating to explicit stream::operator bool() --- diff --git a/src/GMSHPlugin/GMSHPlugin_Hypothesis.cxx b/src/GMSHPlugin/GMSHPlugin_Hypothesis.cxx index 2c11d20..2b414c9 100644 --- a/src/GMSHPlugin/GMSHPlugin_Hypothesis.cxx +++ b/src/GMSHPlugin/GMSHPlugin_Hypothesis.cxx @@ -220,13 +220,13 @@ istream & GMSHPlugin_Hypothesis::LoadFrom(istream & load) int is; double val; - isOK = (load >> is); + isOK = static_cast(load >> is); if (isOK) _is2d = (bool)is; else load.clear(ios::badbit | load.rdstate()); - isOK = (load >> is); + isOK = static_cast(load >> is); if (isOK) _algo2d = (Algo2D)is; else @@ -234,74 +234,74 @@ istream & GMSHPlugin_Hypothesis::LoadFrom(istream & load) if (!_is2d) { - isOK = (load >> is); + isOK = static_cast(load >> is); if (isOK) _algo3d = (Algo3D)is; else load.clear(ios::badbit | load.rdstate()); } - isOK = (load >> is); + isOK = static_cast(load >> is); if (isOK) _recomb2DAlgo = (Recomb2DAlgo)is; else load.clear(ios::badbit | load.rdstate()); - isOK = (load >> is); + isOK = static_cast(load >> is); if (isOK) _recombineAll = (bool)is; else load.clear(ios::badbit | load.rdstate()); - isOK = (load >> is); + isOK = static_cast(load >> is); if (isOK) _subdivAlgo = (SubdivAlgo)is; else load.clear(ios::badbit | load.rdstate()); - isOK = (load >> is); + isOK = static_cast(load >> is); if (isOK) _remeshAlgo = (RemeshAlgo)is; else load.clear(ios::badbit | load.rdstate()); - isOK = (load >> is); + isOK = static_cast(load >> is); if (isOK) _remeshPara = (RemeshPara)is; else load.clear(ios::badbit | load.rdstate()); - isOK = (load >> val); + isOK = static_cast(load >> val); if (isOK) _smouthSteps = val; else load.clear(ios::badbit | load.rdstate()); - isOK = (load >> val); + isOK = static_cast(load >> val); if (isOK) _sizeFactor = val; else load.clear(ios::badbit | load.rdstate()); - isOK = (load >> val); + isOK = static_cast(load >> val); if (isOK) _maxSize = val; else load.clear(ios::badbit | load.rdstate()); - isOK = (load >> val); + isOK = static_cast(load >> val); if (isOK) _minSize = val; else load.clear(ios::badbit | load.rdstate()); - isOK = (load >> is); + isOK = static_cast(load >> is); if (isOK) _secondOrder = (bool)is; else load.clear(ios::badbit | load.rdstate()); - isOK = (load >> is); + isOK = static_cast(load >> is); if (isOK) _useIncomplElem = (bool)is; else @@ -309,12 +309,12 @@ istream & GMSHPlugin_Hypothesis::LoadFrom(istream & load) std::string entry; - isOK = (load >> entry); + isOK = static_cast(load >> entry); if (isOK && entry == "__COMPOUNDS_BEGIN__") { while (isOK && entry != "__COMPOUNDS_END__") { - isOK = (load >> entry); + isOK = static_cast(load >> entry); if (isOK && entry != "__COMPOUNDS_END__") _compounds.insert(entry); }