Salome HOME
Merge remote-tracking branch 'remotes/origin/EDF_2020_Lot2'
[modules/shaper.git] / src / GeomAPI / GeomAPI_AISObject.cpp
index ae3ebdab0f2d916455f243dfa67714f05ad2c0da..b150bffca1345bb50a393a42901721ee072c9ebe 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
@@ -105,12 +105,11 @@ std::shared_ptr<GeomAPI_Shape> GeomAPI_AISObject::getShape() const
   if (!anAIS.IsNull()) {
     Handle(AIS_Shape) aShapeAIS = Handle(AIS_Shape)::DownCast(anAIS);
     if (aShapeAIS) {
-      std::shared_ptr<GeomAPI_Shape> aResult(new GeomAPI_Shape);
+      aResult.reset(new GeomAPI_Shape);
       aResult->setImpl(new TopoDS_Shape(aShapeAIS->Shape()));
-      return aResult;
     }
   }
-  return std::shared_ptr<GeomAPI_Shape>();
+  return aResult;
 }
 
 void GeomAPI_AISObject::createDistance(std::shared_ptr<GeomAPI_Pnt> theStartPoint,