Salome HOME
Extrusion fix
[modules/shaper.git] / src / ModelAPI / ModelAPI_Tools.cpp
index 20df8a89d2e5a36255d32f9308de5de5ec237022..3f823dcb2f9e8fde966d603bb483a26260776df4 100755 (executable)
@@ -206,7 +206,7 @@ void findRandomColor(std::vector<int>& theValues)
     fillColorMap();
   }
 
-  int aSize = myColorMap.size();
+  size_t aSize = myColorMap.size();
   int anIndex = rand() % aSize;
   if (myColorMap.find(anIndex) != myColorMap.end()) {
     theValues = myColorMap.at(anIndex);
@@ -252,7 +252,7 @@ FeaturePtr findPartFeature(const DocumentPtr& theMain, const DocumentPtr& theSub
 CompositeFeaturePtr compositeOwner(const FeaturePtr& theFeature)
 {
   if (theFeature.get() && theFeature->data()->isValid()) {
-    const std::set<std::shared_ptr<ModelAPI_Attribute> > aRefs = theFeature->data()->refsToMe();
+    const std::set<std::shared_ptr<ModelAPI_Attribute> >& aRefs = theFeature->data()->refsToMe();
     std::set<std::shared_ptr<ModelAPI_Attribute> >::const_iterator aRefIter = aRefs.begin();
     for(; aRefIter != aRefs.end(); aRefIter++) {
       CompositeFeaturePtr aComp = std::dynamic_pointer_cast<ModelAPI_CompositeFeature>