Salome HOME
23239: [CEA 1739] Regression : crash trying to create mesh
[modules/smesh.git] / src / StdMeshers / StdMeshers_Arithmetic1D.cxx
index 481b5b17305e80ed7bc1910ea792e267e6f0d3c1..deabddb71037f2bd1c802e22587dff7aa05f1b87 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2015  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -144,22 +144,22 @@ istream & StdMeshers_Arithmetic1D::LoadFrom(istream & load)
 {
   bool isOK = true;
   int intVal;
-  isOK = (load >> _begLength);
+  isOK = static_cast<bool>(load >> _begLength);
   if (!isOK)
     load.clear(ios::badbit | load.rdstate());
-  isOK = (load >> _endLength);
+  isOK = static_cast<bool>(load >> _endLength);
 
   if (!isOK)
     load.clear(ios::badbit | load.rdstate());
 
-  isOK = (load >> intVal);
+  isOK = static_cast<bool>(load >> intVal);
   if (isOK && intVal > 0) {
     _edgeIDs.reserve( intVal );
-    for (int i = 0; i < _edgeIDs.capacity() && isOK; i++) {
-      isOK = (load >> intVal);
+    for ( size_t i = 0; i < _edgeIDs.capacity() && isOK; i++) {
+      isOK = static_cast<bool>(load >> intVal);
       if ( isOK ) _edgeIDs.push_back( intVal );
     }
-    isOK = (load >> _objEntry);
+    isOK = static_cast<bool>(load >> _objEntry);
   }
 
   return load;
@@ -167,7 +167,7 @@ istream & StdMeshers_Arithmetic1D::LoadFrom(istream & load)
 
 //=============================================================================
 /*!
- *  
+ *
  */
 //=============================================================================