]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
DOF is visualized in label widget: correction compilation on Linux
authornds <nds@opencascade.com>
Tue, 19 Apr 2016 14:43:49 +0000 (17:43 +0300)
committernds <nds@opencascade.com>
Tue, 19 Apr 2016 14:43:49 +0000 (17:43 +0300)
src/SketchSolver/SketchSolver_Manager.cpp

index f83e7fe48413165d7bceb71b032a8b0a8db36ad5..6511bc84315d7c40f067b4b92129682c45a66436 100644 (file)
@@ -48,7 +48,7 @@
 #include <list>
 #include <set>
 #include <memory>
-#include <cmath>
+#include <sstream>
 
 static const Events_ID anUpdateEvent = Events_Loop::eventByName(EVENT_OBJECT_UPDATED);
 
@@ -569,10 +569,11 @@ void SketchSolver_Manager::degreesOfFreedom()
       continue; // nothing is changed
     myDoF[aDoFIt->first] = aDoFIt->second;
     // change attribute value
-    char aValue[10];
-    _itoa_s(aDoFIt->second, aValue, 10);
-    aDoFIt->first->data()->string(SketchPlugin_Sketch::SOLVER_DOF())->setValue(
-                                                             "DOF(degree of freedom) = "+ std::string(aValue));
+    std::ostringstream aStream;
+    std::string aValue = "DOF(degree of freedom) = ";
+    aStream << aDoFIt->second;
+    aDoFIt->first->data()->string(SketchPlugin_Sketch::SOLVER_DOF())->setValue(aValue);
+
     Events_Loop::loop()->flush(Events_Loop::eventByName(EVENT_OBJECT_UPDATED));
   }
 }