Salome HOME
bos #20661 EDF 22847 - Move to the end
[modules/shaper.git] / src / Config / Config_PropManager.cpp
index e9da0fad1b41aa0e54e19f4891e58a73c9403bb6..af3f1f55ea6e17b26b1bee7c29fbb43b67d924e9 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2014-2019  CEA/DEN, EDF R&D
+// Copyright (C) 2014-2020  CEA/DEN, EDF R&D
 //
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
@@ -50,8 +50,10 @@ Config_Prop* Config_PropManager::registerProp(const std::string& theSection,
       aProp->setType(theType);
       aProp->setTitle(theTitle);
     }
-    aProp->setMin(theMin);
-    aProp->setMax(theMax);
+    if (theMin != "")
+      aProp->setMin(theMin);
+    if (theMax != "")
+      aProp->setMax(theMax);
   }
   else {
     aProp =
@@ -207,7 +209,7 @@ double Config_PropManager::stringToDouble(const std::string& theDouble)
   // change locale and convert "," to "." if exists
   std::string aCurLocale = setlocale(LC_NUMERIC, 0);
   setlocale(LC_NUMERIC, "C");
-  int dotpos = (int)aStr.find(',');
+  size_t dotpos = aStr.find(',');
   if (dotpos != std::string::npos)
     aStr.replace(dotpos, 1, ".");