]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Fix: critical make_shared problem in Debian 6 V_1.3.1
authorspo <sergey.pokhodenko@opencascade.com>
Fri, 31 Jul 2015 09:20:47 +0000 (12:20 +0300)
committerspo <sergey.pokhodenko@opencascade.com>
Fri, 31 Jul 2015 09:23:01 +0000 (12:23 +0300)
14 files changed:
src/Config/Config_ValidatorReader.cpp
src/FeaturesPlugin/FeaturesPlugin_ExtrusionBoolean.cpp
src/FeaturesPlugin/FeaturesPlugin_Revolution.cpp
src/FeaturesPlugin/FeaturesPlugin_RevolutionBoolean.cpp
src/GeomAlgoAPI/GeomAlgoAPI_Movement.cpp
src/GeomAlgoAPI/GeomAlgoAPI_Placement.cpp
src/GeomAlgoAPI/GeomAlgoAPI_Prism.cpp
src/GeomAlgoAPI/GeomAlgoAPI_Revolution.cpp
src/GeomAlgoAPI/GeomAlgoAPI_Rotation.cpp
src/Model/Model_ResultPart.cpp
src/PartSet/PartSet_WidgetSketchLabel.cpp
src/PartSetPlugin/PartSetPlugin_Plugin.cpp
src/SketchPlugin/SketchPlugin_Plugin.cpp
src/XGUI/XGUI_ActionsMgr.cpp

index ef969cd55c06483042d92b18588ae955ac454025..dfeb81cc70cfdf13891910749fbc77285de94d82 100644 (file)
@@ -92,8 +92,8 @@ void Config_ValidatorReader::processSelectionFilter(xmlNodePtr theNode)
 {
   Events_ID aFilterEvent = Events_Loop::eventByName(EVENT_SELFILTER_LOADED);
   Events_Loop* aEvLoop = Events_Loop::loop();
-  std::shared_ptr<Config_SelectionFilterMessage> aMessage =
-      std::make_shared<Config_SelectionFilterMessage>(aFilterEvent, this);
+  std::shared_ptr<Config_SelectionFilterMessage> aMessage(
+      new Config_SelectionFilterMessage(aFilterEvent, this));
   std::string aSelectionFilterId;
   std::list<std::string> aParameters;
   getParametersInfo(theNode, aSelectionFilterId, aParameters);
index 4df58cd62193071476862fe95f3e14e27c5ed656..7fceaf80489907bfbb16bcb6e004d7f4ac0a384a 100755 (executable)
@@ -74,9 +74,7 @@ void FeaturesPlugin_ExtrusionBoolean::makeSolids(const ListOfShape& theFaces,
   theResults.clear();
   for(ListOfShape::const_iterator aFacesIt = theFaces.begin(); aFacesIt != theFaces.end(); aFacesIt++) {
     std::shared_ptr<GeomAPI_Shape> aBaseShape = *aFacesIt;
-    std::shared_ptr<GeomAlgoAPI_Prism> aPrismAlgo = std::make_shared<GeomAlgoAPI_Prism>(aBaseShape,
-                                                                                        aToShape, aToSize,
-                                                                                        aFromShape, aFromSize);
+    std::shared_ptr<GeomAlgoAPI_Prism> aPrismAlgo = std::shared_ptr<GeomAlgoAPI_Prism>(new GeomAlgoAPI_Prism(aBaseShape, aToShape, aToSize, aFromShape, aFromSize));
 
     // Checking that the algorithm worked properly.
     if(!aPrismAlgo->isDone() || !aPrismAlgo->shape().get() || aPrismAlgo->shape()->isNull() ||
@@ -88,4 +86,4 @@ void FeaturesPlugin_ExtrusionBoolean::makeSolids(const ListOfShape& theFaces,
     theResults.push_back(aPrismAlgo->shape());
     theAlgos.push_back(aPrismAlgo);
   }
-}
\ No newline at end of file
+}
index 3bd64910c877776803eceff05277c89e9ef5f975..829268839ea7a2f49671dab7a783ad272cc8de26 100644 (file)
@@ -64,12 +64,12 @@ void FeaturesPlugin_Revolution::execute()
   std::shared_ptr<GeomAPI_Edge> anEdge;
   std::shared_ptr<ModelAPI_AttributeSelection> anObjRef = selection(AXIS_OBJECT_ID());
   if(anObjRef && anObjRef->value() && anObjRef->value()->isEdge()) {
-    anEdge = std::make_shared<GeomAPI_Edge>(anObjRef->value());
+    anEdge = std::shared_ptr<GeomAPI_Edge>(new GeomAPI_Edge(anObjRef->value()));
   } else if(anObjRef->context() && anObjRef->context()->shape() && anObjRef->context()->shape()->isEdge()) {
-    anEdge = std::make_shared<GeomAPI_Edge>(anObjRef->context()->shape());
+    anEdge = std::shared_ptr<GeomAPI_Edge>(new GeomAPI_Edge(anObjRef->context()->shape()));
   }
   if(anEdge) {
-    anAxis = std::make_shared<GeomAPI_Ax1>(anEdge->line()->location(), anEdge->line()->direction());
+    anAxis = std::shared_ptr<GeomAPI_Ax1>(new GeomAPI_Ax1(anEdge->line()->location(), anEdge->line()->direction()));
   }
 
   // Getting angles.
index e99a26428784e8fd074f3e013dd1c819a771df93..ee3e750db2e4bce39f1f45c7c5885b912bd9115c 100644 (file)
@@ -48,7 +48,7 @@ void FeaturesPlugin_RevolutionBoolean::makeSolids(const ListOfShape& theFaces,
   if(anObjRef && anObjRef->value() && anObjRef->value()->isEdge()) {
     anEdge = std::shared_ptr<GeomAPI_Edge>(new GeomAPI_Edge(anObjRef->value()));
   } else if(anObjRef->context() && anObjRef->context()->shape() && anObjRef->context()->shape()->isEdge()) {
-    anEdge = std::make_shared<GeomAPI_Edge>(anObjRef->context()->shape());
+    anEdge = std::shared_ptr<GeomAPI_Edge>(new GeomAPI_Edge(anObjRef->context()->shape()));
   }
   if(anEdge) {
     anAxis = std::shared_ptr<GeomAPI_Ax1>(new GeomAPI_Ax1(anEdge->line()->location(), anEdge->line()->direction()));
@@ -91,9 +91,7 @@ void FeaturesPlugin_RevolutionBoolean::makeSolids(const ListOfShape& theFaces,
   theResults.clear();
   for(ListOfShape::const_iterator aFacesIt = theFaces.begin(); aFacesIt != theFaces.end(); aFacesIt++) {
     std::shared_ptr<GeomAPI_Shape> aBaseShape = *aFacesIt;
-    std::shared_ptr<GeomAlgoAPI_Revolution> aRevolAlgo = std::make_shared<GeomAlgoAPI_Revolution>(aBaseShape, anAxis,
-                                                                                                  aToShape, aToAngle,
-                                                                                                  aFromShape, aFromAngle);
+    std::shared_ptr<GeomAlgoAPI_Revolution> aRevolAlgo = std::shared_ptr<GeomAlgoAPI_Revolution>(new GeomAlgoAPI_Revolution(aBaseShape, anAxis, aToShape, aToAngle, aFromShape, aFromAngle));
 
     // Checking that the algorithm worked properly.
     if(!aRevolAlgo->isDone()  || !aRevolAlgo->shape().get() || aRevolAlgo->shape()->isNull() ||
@@ -105,4 +103,4 @@ void FeaturesPlugin_RevolutionBoolean::makeSolids(const ListOfShape& theFaces,
     theResults.push_back(aRevolAlgo->shape());
     theAlgos.push_back(aRevolAlgo);
   }
-}
\ No newline at end of file
+}
index a35988cde3f5346a42a627ec39069a470b7202cd..9be419ffec9b2e0d0d4e946e87775438e6e487de 100644 (file)
@@ -53,8 +53,7 @@ void GeomAlgoAPI_Movement::build(std::shared_ptr<GeomAPI_Shape> theSourceShape,
     TopLoc_Location aDelta(aTrsf);
     aResult = aSourceShape.Moved(aDelta);
     // store the accumulated information about the result and this delta
-    myTrsf = std::make_shared<GeomAPI_Trsf>(
-      new gp_Trsf(aTrsf * aSourceShape.Location().Transformation()));
+    myTrsf = std::shared_ptr<GeomAPI_Trsf>(new GeomAPI_Trsf(new gp_Trsf(aTrsf * aSourceShape.Location().Transformation())));
     myDone = true; // is OK for sure
   } else {
     BRepBuilderAPI_Transform* aBuilder = new BRepBuilderAPI_Transform(aSourceShape, aTrsf, true);
index d8fd7a7498cdb9f884d0fb362ddf0e81fbcd9b0e..6e28fc603c5231023467fcbed35e795957c7fbbc 100644 (file)
@@ -195,8 +195,7 @@ void GeomAlgoAPI_Placement::build(
     TopoDS_Shape aResult = aSourceShape.Moved(aDelta);
     myShape->setImpl(new TopoDS_Shape(aResult));
     // store the accumulated information about the result and this delta
-    myTrsf = std::make_shared<GeomAPI_Trsf>(
-      new gp_Trsf(aTrsf * aSourceShape.Location().Transformation()));
+    myTrsf = std::shared_ptr<GeomAPI_Trsf>(new GeomAPI_Trsf(new gp_Trsf(aTrsf * aSourceShape.Location().Transformation())));
     myDone = true; // it is allways true for simple transformation generation
   } else { // internal rebuild of the shape
     // Transform the shape with copying it
index 4c7eb7ed10fd0fa984980f6a38874855bd6a04a7..0677d7fc6c7a03dedf2f3fba6d9c47118b905561 100644 (file)
@@ -111,19 +111,19 @@ void GeomAlgoAPI_Prism::build(const std::shared_ptr<GeomAPI_Shape>& theBasis,
         aResult = GeomAlgoAPI_DFLoader::refineResult(aResult);
       }
       // fill data map to keep correct orientation of sub-shapes
-      myMap = std::make_shared<GeomAPI_DataMapOfShapeShape>();
+      myMap = std::shared_ptr<GeomAPI_DataMapOfShapeShape>(new GeomAPI_DataMapOfShapeShape());
       for (TopExp_Explorer Exp(aResult,TopAbs_FACE); Exp.More(); Exp.Next()) {
         std::shared_ptr<GeomAPI_Shape> aCurrentShape(new GeomAPI_Shape());
         aCurrentShape->setImpl(new TopoDS_Shape(Exp.Current()));
         myMap->bind(aCurrentShape, aCurrentShape);
       }
-      myShape = std::make_shared<GeomAPI_Shape>();
+      myShape = std::shared_ptr<GeomAPI_Shape>(new GeomAPI_Shape());
       myShape->setImpl(new TopoDS_Shape(aResult));
-      myFirst = std::make_shared<GeomAPI_Shape>();
+      myFirst = std::shared_ptr<GeomAPI_Shape>(new GeomAPI_Shape());
       myFirst->setImpl(new TopoDS_Shape(aBuilder->Modified(aFromShape).First()));
-      myLast = std::make_shared<GeomAPI_Shape>();
+      myLast = std::shared_ptr<GeomAPI_Shape>(new GeomAPI_Shape());
       myLast->setImpl(new TopoDS_Shape(aBuilder->Modified(aToShape).First()));
-      myMkShape = std::make_shared<GeomAlgoAPI_MakeShape>();
+      myMkShape = std::shared_ptr<GeomAlgoAPI_MakeShape>(new GeomAlgoAPI_MakeShape());
       myMkShape->setImpl(aBuilder);
     }
   }
index 1489fcd4b061efacc3f0f948fd04bdf5ebeac27b..f47d8a06ff23c56be6f87a4ce88c238bbbf1791c 100644 (file)
@@ -127,8 +127,8 @@ void GeomAlgoAPI_Revolution::build(const std::shared_ptr<GeomAPI_Shape>& theBasi
   gp_Ax1 anAxis = theAxis->impl<gp_Ax1>();
 
   ListOfMakeShape aListOfMakeShape;
-  myFirst = std::make_shared<GeomAPI_Shape>();
-  myLast = std::make_shared<GeomAPI_Shape>();
+  myFirst = std::shared_ptr<GeomAPI_Shape>(new GeomAPI_Shape());
+  myLast = std::shared_ptr<GeomAPI_Shape>(new GeomAPI_Shape());
 
   TopoDS_Shape aResult;
   if(!theFromShape && !theToShape) { // Case 1: When only angles was set.
@@ -138,7 +138,7 @@ void GeomAlgoAPI_Revolution::build(const std::shared_ptr<GeomAPI_Shape>& theBasi
     BRepBuilderAPI_Transform* aBaseTransform = new BRepBuilderAPI_Transform(aBasisFace,
                                                                             aBaseTrsf,
                                                                             true);
-    aListOfMakeShape.push_back(std::make_shared<GeomAlgoAPI_MakeShape>(aBaseTransform));
+    aListOfMakeShape.push_back(std::shared_ptr<GeomAlgoAPI_MakeShape>(new GeomAlgoAPI_MakeShape(aBaseTransform)));
     TopoDS_Shape aRotatedBaseShape = aBaseTransform->Shape();
 
     // Making revolution to the angle equal to the sum of "from angle" and "to angle".
@@ -151,7 +151,7 @@ void GeomAlgoAPI_Revolution::build(const std::shared_ptr<GeomAPI_Shape>& theBasi
     if(!aRevolBuilder->IsDone()) {
       return;
     }
-    aListOfMakeShape.push_back(std::make_shared<GeomAlgoAPI_MakeShape>(aRevolBuilder));
+    aListOfMakeShape.push_back(std::shared_ptr<GeomAlgoAPI_MakeShape>(new GeomAlgoAPI_MakeShape(aRevolBuilder)));
     aResult = aRevolBuilder->Shape();
 
     // Setting naming.
@@ -198,7 +198,7 @@ void GeomAlgoAPI_Revolution::build(const std::shared_ptr<GeomAPI_Shape>& theBasi
     // Making revolution to the 360 angle.
     BRepPrimAPI_MakeRevol* aRevolBuilder = new BRepPrimAPI_MakeRevol(aBasisFace, anAxis, 2 * M_PI, Standard_True);
     aRevolBuilder->Build();
-    aListOfMakeShape.push_back(std::make_shared<GeomAlgoAPI_MakeShape>(aRevolBuilder));
+    aListOfMakeShape.push_back(std::shared_ptr<GeomAlgoAPI_MakeShape>(new GeomAlgoAPI_MakeShape(aRevolBuilder)));
     TopoDS_Shape aRevolShape = aRevolBuilder->Shape();
 
     // Cutting revolution with from plane.
@@ -207,7 +207,7 @@ void GeomAlgoAPI_Revolution::build(const std::shared_ptr<GeomAPI_Shape>& theBasi
     if(!aFromCutBuilder->IsDone()) {
       return;
     }
-    aListOfMakeShape.push_back(std::make_shared<GeomAlgoAPI_MakeShape>(aFromCutBuilder));
+    aListOfMakeShape.push_back(std::shared_ptr<GeomAlgoAPI_MakeShape>(new GeomAlgoAPI_MakeShape(aFromCutBuilder)));
     aResult = aFromCutBuilder->Shape();
 
     // Cutting revolution with to plane.
@@ -216,7 +216,7 @@ void GeomAlgoAPI_Revolution::build(const std::shared_ptr<GeomAPI_Shape>& theBasi
     if(!aToCutBuilder->IsDone()) {
       return;
     }
-    aListOfMakeShape.push_back(std::make_shared<GeomAlgoAPI_MakeShape>(aToCutBuilder));
+    aListOfMakeShape.push_back(std::shared_ptr<GeomAlgoAPI_MakeShape>(new GeomAlgoAPI_MakeShape(aToCutBuilder)));
     aResult = aToCutBuilder->Shape();
 
     // If after cut we got more than one solids then take closest to the center of mass of the base face.
@@ -281,7 +281,7 @@ void GeomAlgoAPI_Revolution::build(const std::shared_ptr<GeomAPI_Shape>& theBasi
     // Making revolution to the 360 angle.
     BRepPrimAPI_MakeRevol* aRevolBuilder = new BRepPrimAPI_MakeRevol(aBasisFace, anAxis, 2 * M_PI, Standard_True);
     aRevolBuilder->Build();
-    aListOfMakeShape.push_back(std::make_shared<GeomAlgoAPI_MakeShape>(aRevolBuilder));
+    aListOfMakeShape.push_back(std::shared_ptr<GeomAlgoAPI_MakeShape>(new GeomAlgoAPI_MakeShape(aRevolBuilder)));
     TopoDS_Shape aRevolShape = aRevolBuilder->Shape();
 
     // Cutting revolution with bounding plane.
@@ -290,7 +290,7 @@ void GeomAlgoAPI_Revolution::build(const std::shared_ptr<GeomAPI_Shape>& theBasi
     if(!aBoundingCutBuilder->IsDone()) {
       return;
     }
-    aListOfMakeShape.push_back(std::make_shared<GeomAlgoAPI_MakeShape>(aBoundingCutBuilder));
+    aListOfMakeShape.push_back(std::shared_ptr<GeomAlgoAPI_MakeShape>(new GeomAlgoAPI_MakeShape(aBoundingCutBuilder)));
     aResult = aBoundingCutBuilder->Shape();
     TopExp_Explorer anExp1(aResult, TopAbs_SOLID);
 
@@ -323,7 +323,7 @@ void GeomAlgoAPI_Revolution::build(const std::shared_ptr<GeomAPI_Shape>& theBasi
       TopoDS_Shape aCutResult = aBasisCutBuilder->Shape();
       TopExp_Explorer anExp(aCutResult, TopAbs_SOLID);
       if(anExp.More()) {
-        aListOfMakeShape.push_back(std::make_shared<GeomAlgoAPI_MakeShape>(aBasisCutBuilder));
+        aListOfMakeShape.push_back(std::shared_ptr<GeomAlgoAPI_MakeShape>(new GeomAlgoAPI_MakeShape(aBasisCutBuilder)));
         aResult = aCutResult;
       }
     }
@@ -354,15 +354,15 @@ void GeomAlgoAPI_Revolution::build(const std::shared_ptr<GeomAPI_Shape>& theBasi
   }
 
   // fill data map to keep correct orientation of sub-shapes
-  myMap = std::make_shared<GeomAPI_DataMapOfShapeShape>();
+  myMap = std::shared_ptr<GeomAPI_DataMapOfShapeShape>(new GeomAPI_DataMapOfShapeShape());
   for (TopExp_Explorer Exp(aResult,TopAbs_FACE); Exp.More(); Exp.Next()) {
     std::shared_ptr<GeomAPI_Shape> aCurrentShape(new GeomAPI_Shape());
     aCurrentShape->setImpl(new TopoDS_Shape(Exp.Current()));
     myMap->bind(aCurrentShape, aCurrentShape);
   }
-  myShape = std::make_shared<GeomAPI_Shape>();
+  myShape = std::shared_ptr<GeomAPI_Shape>(new GeomAPI_Shape());
   myShape->setImpl(new TopoDS_Shape(aResult));
-  myMkShape = std::make_shared<GeomAlgoAPI_MakeShapeList>();
+  myMkShape = std::shared_ptr<GeomAlgoAPI_MakeShapeList>(new GeomAlgoAPI_MakeShapeList());
   myDone = true;
   return;
 }
index dc150f1945f010807a4b3bb8d044dde3092f0d0c..1d1d8495971a03daf71238b9c369c11c488df01c 100644 (file)
@@ -51,8 +51,7 @@ void GeomAlgoAPI_Rotation::build(std::shared_ptr<GeomAPI_Shape> theSourceShape,
   if (theSimpleTransform) {
     TopLoc_Location aDelta(aTrsf);
     aResult = aSourceShape.Moved(aDelta);
-    myTrsf = std::make_shared<GeomAPI_Trsf>(
-      new gp_Trsf(aTrsf * aSourceShape.Location().Transformation()));
+    myTrsf = std::shared_ptr<GeomAPI_Trsf>(new GeomAPI_Trsf(new gp_Trsf(aTrsf * aSourceShape.Location().Transformation())));
     myDone = true; // is OK for sure
   } else {
     BRepBuilderAPI_Transform* aBuilder = new BRepBuilderAPI_Transform(aSourceShape, aTrsf, true);
index 872dbaf023ed78376a8cf68999816be94e9c866b..96957848aa88043dc3419ed34bce058356d5c5c2 100644 (file)
@@ -288,7 +288,7 @@ void Model_ResultPart::setTrsf(std::shared_ptr<ModelAPI_Result> theThis,
 {
   updateShape();
   if (theTransformation.get()) {
-    myTrsf = std::make_shared<gp_Trsf>(theTransformation->impl<gp_Trsf>());
+    myTrsf = std::shared_ptr<gp_Trsf>(new gp_Trsf(theTransformation->impl<gp_Trsf>()));
   }
   // the result must be explicitly updated
   static Events_Loop* aLoop = Events_Loop::loop();
index 566552ba684cf91dac13c9a189239fe4fe658e29..f0bfdc8a20b8a9985c67359e8620bd66f3ff819d 100644 (file)
@@ -135,7 +135,7 @@ void PartSet_WidgetSketchLabel::updateByPlaneSelected(const ModuleBase_ViewerPrs
 
   // selection happens in OCC viewer
   if (!aShape.IsNull()) {
-    aGShape =  std::make_shared<GeomAPI_Shape>();
+    aGShape =  std::shared_ptr<GeomAPI_Shape>(new GeomAPI_Shape());
     aGShape->setImpl(new TopoDS_Shape(aShape));
 
     if (aSelAttr && aSelAttr->context()) {
index c4d50434636509f50168f7a0aef153dd3e96e73b..f892c57a7f5a6d04675df7d135b32facc2ad95ad 100644 (file)
@@ -58,8 +58,8 @@ std::shared_ptr<ModelAPI_FeatureStateMessage> PartSetPlugin_Plugin::getFeaturesS
 {
   const Events_ID kResponseEvent =
         Events_Loop::loop()->eventByName(EVENT_FEATURE_STATE_RESPONSE);
-  std::shared_ptr<ModelAPI_FeatureStateMessage> aMsg =
-      std::make_shared<ModelAPI_FeatureStateMessage>(kResponseEvent, this);
+  std::shared_ptr<ModelAPI_FeatureStateMessage> aMsg(
+      new ModelAPI_FeatureStateMessage(kResponseEvent, this));
   std::string aStdDocKind = ModelAPI_Session::get()->activeDocument()->kind();
   bool aDocIsPart = (aStdDocKind == PartSetPlugin_Part::ID());
   aMsg->setState(PartSetPlugin_Part::ID(), true);
index 7742fa5c10c94fd84a6fbbc853cbf94d2a7b1a22..1852d4a745f4786b9a749151e16210ddf6804257 100644 (file)
@@ -156,8 +156,8 @@ std::shared_ptr<ModelAPI_FeatureStateMessage> SketchPlugin_Plugin
 ::getFeaturesState(const std::shared_ptr<ModelAPI_Feature>& theFeature) const
 {
   const Events_ID kResponseEvent = Events_Loop::loop()->eventByName(EVENT_FEATURE_STATE_RESPONSE);
-  std::shared_ptr<ModelAPI_FeatureStateMessage> aMsg =
-      std::make_shared<ModelAPI_FeatureStateMessage>(kResponseEvent, this);
+  std::shared_ptr<ModelAPI_FeatureStateMessage> aMsg(
+      new ModelAPI_FeatureStateMessage(kResponseEvent, this));
 
   bool aHasSketchPlane = false;
   std::shared_ptr<SketchPlugin_Sketch> aSketchFeature =
index 83d3e09b0b02d854ee2033be34a3819cbf703e77..525d58892d0737a218ab7bc46f2370e1ec9f6bc4 100644 (file)
@@ -357,8 +357,8 @@ void XGUI_ActionsMgr::updateByPlugins(FeaturePtr anActiveFeature)
 {
   static Events_ID aStateRequestEventId = Events_Loop::loop()->eventByName(
       EVENT_FEATURE_STATE_REQUEST);
-  std::shared_ptr<ModelAPI_FeatureStateMessage> aMsg =
-      std::make_shared<ModelAPI_FeatureStateMessage>(aStateRequestEventId, this);
+  std::shared_ptr<ModelAPI_FeatureStateMessage> aMsg(
+      new ModelAPI_FeatureStateMessage(aStateRequestEventId, this));
   aMsg->setFeature(anActiveFeature);
   Events_Loop::loop()->send(aMsg, false);
 }