Salome HOME
Issue #412: Crash on delete sketch line with constraints
[modules/shaper.git] / src / SketchPlugin / SketchPlugin_ResultValidators.cpp
index e40022f7cdc1cf10529424c8e6dbbfb9b8b1ee4d..15f8554a2f9f25012a8ebb6cb7707c7815ede8ec 100644 (file)
@@ -1,3 +1,5 @@
+// Copyright (C) 2014-20xx CEA/DEN, EDF R&D -->
+
 // File:        Model_ResultValidators.cpp
 // Created:     23 July 2014
 // Author:      Vitaly SMETANNIKOV
@@ -10,7 +12,7 @@
 
 ResultPtr result(const ObjectPtr theObject)
 {
-  return boost::dynamic_pointer_cast<ModelAPI_Result>(theObject);
+  return std::dynamic_pointer_cast<ModelAPI_Result>(theObject);
 }
 
 bool SketchPlugin_ResultPointValidator::isValid(const ObjectPtr theObject) const
@@ -18,7 +20,7 @@ bool SketchPlugin_ResultPointValidator::isValid(const ObjectPtr theObject) const
   ResultPtr aResult = result(theObject);
   if (!aResult)
     return false;
-  boost::shared_ptr<GeomAPI_Shape> aShape = ModelAPI_Tools::shape(aResult);
+  std::shared_ptr<GeomAPI_Shape> aShape = ModelAPI_Tools::shape(aResult);
   return aShape && aShape->isVertex();
 }
 
@@ -27,7 +29,7 @@ bool SketchPlugin_ResultLineValidator::isValid(const ObjectPtr theObject) const
   ResultPtr aResult = result(theObject);
   if (!aResult)
     return false;
-  boost::shared_ptr<GeomAPI_Shape> aShape = ModelAPI_Tools::shape(aResult);
+  std::shared_ptr<GeomAPI_Shape> aShape = ModelAPI_Tools::shape(aResult);
   return aShape && aShape->isEdge() && GeomAPI_Curve(aShape).isLine();
 }
 
@@ -36,7 +38,6 @@ bool SketchPlugin_ResultArcValidator::isValid(const ObjectPtr theObject) const
   ResultPtr aResult = result(theObject);
   if (!aResult)
     return false;
-  boost::shared_ptr<GeomAPI_Shape> aShape = ModelAPI_Tools::shape(aResult);
+  std::shared_ptr<GeomAPI_Shape> aShape = ModelAPI_Tools::shape(aResult);
   return aShape && aShape->isEdge() && GeomAPI_Curve(aShape).isCircle();
 }
-