]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Fix for compilation errors on Linux
authorVitaly SMETANNIKOV <vsv@opencascade.com>
Wed, 11 Nov 2015 13:23:16 +0000 (16:23 +0300)
committerVitaly SMETANNIKOV <vsv@opencascade.com>
Wed, 11 Nov 2015 13:23:16 +0000 (16:23 +0300)
src/Model/Model_Document.cpp
src/XGUI/XGUI_Tools.cpp
src/XGUI/XGUI_Tools.h

index c6e15c7ef3965458559967b83cde2af2ee99f288..07ae19b100cd6f4191f27919f7014ee905a0f384 100755 (executable)
@@ -438,7 +438,7 @@ static bool isEmptyTransaction(const Handle(TDocStd_Document)& theDoc) {
   const TDF_AttributeDeltaList& anAttrs = aDelta->AttributeDeltas();
   for (TDF_ListIteratorOfAttributeDeltaList anAttr(anAttrs); anAttr.More(); anAttr.Next()) {
     Handle(TDF_AttributeDelta)& anADelta = anAttr.Value();
-    Handle(TDF_DeltaOnAddition)& anAddition = Handle(TDF_DeltaOnAddition)::DownCast(anADelta);
+    Handle(TDF_DeltaOnAddition) anAddition = Handle(TDF_DeltaOnAddition)::DownCast(anADelta);
     if (anAddition.IsNull()) { // if the attribute was added, transaction is not empty
       if (!anADelta->Label().IsNull() && !anADelta->Attribute().IsNull()) {
         Handle(TDF_Attribute) aCurrentAttr;
index cd7248f45e878c93cba110f38930608f7afe4b00..ab9ef819f618481662ef078c9f63979fd9326252 100644 (file)
@@ -155,20 +155,6 @@ void refsToFeatureInFeatureDocument(const ObjectPtr& theObject, std::set<Feature
   }
 }
 
-//**************************************************************
-bool XGUI_Tools::isSubOfComposite(const ObjectPtr& theObject)
-{
-  bool isSub = false;
-  std::set<FeaturePtr> aRefFeatures;
-  refsToFeatureInFeatureDocument(theObject, aRefFeatures);
-  std::set<FeaturePtr>::const_iterator anIt = aRefFeatures.begin(),
-                                       aLast = aRefFeatures.end();
-  for (; anIt != aLast && !isSub; anIt++) {
-    isSub = isSubOfComposite(theObject, *anIt);
-  }
-  return isSub;
-}
-
 //**************************************************************
 bool isSubOfComposite(const ObjectPtr& theObject, const FeaturePtr& theFeature)
 {
@@ -188,6 +174,20 @@ bool isSubOfComposite(const ObjectPtr& theObject, const FeaturePtr& theFeature)
   return isSub;
 }
 
+//**************************************************************
+bool isSubOfComposite(const ObjectPtr& theObject)
+{
+  bool isSub = false;
+  std::set<FeaturePtr> aRefFeatures;
+  refsToFeatureInFeatureDocument(theObject, aRefFeatures);
+  std::set<FeaturePtr>::const_iterator anIt = aRefFeatures.begin(),
+                                       aLast = aRefFeatures.end();
+  for (; anIt != aLast && !isSub; anIt++) {
+    isSub = isSubOfComposite(theObject, *anIt);
+  }
+  return isSub;
+}
+
 //**************************************************************
 void refsToFeatureInAllDocuments(const ObjectPtr& theSourceObject, const ObjectPtr& theObject,
                                  std::set<FeaturePtr>& theDirectRefFeatures, 
index 48ab0d57b892676cb315d481eacb94cd627efb9c..18f237a007db14c1e23fac85b218098086faa713 100644 (file)
@@ -108,7 +108,7 @@ void XGUI_EXPORT refsToFeatureInFeatureDocument(const ObjectPtr& theObject,
  \param theFeature a candidate to be a composite feature
  \return a boolean value
  */
-bool XGUI_EXPORT isSubOfComposite(const ObjectPtr& theObject, const FeaturePtr& theFeature);
+bool XGUI_EXPORT isSubOfComposite(const ObjectPtr& theObject);
 
 /*!
  Returns a container of references feature to the source object. The search happens in the object