]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Fixed the Linux compilation
authormpv <mpv@opencascade.com>
Mon, 15 Jan 2018 13:52:44 +0000 (16:52 +0300)
committermpv <mpv@opencascade.com>
Mon, 15 Jan 2018 13:52:44 +0000 (16:52 +0300)
src/Model/Model_AttributeSelection.cpp

index ad18492ced6ec1c636d94e3b72a24c00aa7a5a02..7c86500cd0e744f0d2f2e475d62fc8b4aa7c5ea1 100644 (file)
@@ -887,8 +887,11 @@ void Model_AttributeSelection::selectSubShape(
         ResultCompSolidPtr aCompContext = ModelAPI_Tools::compSolidOwner(aCont);
         int aSubsSize = (aCompContext.get() ? aCompContext->numberOfSubs() : 0) + 1;
         for(int aResultNum = 0; aResultNum < aSubsSize; aResultNum++) {
-          ResultPtr aResCont = aCompContext.get() ? (aResultNum == aSubsSize - 1 ?
-                  aCompContext : aCompContext->subResult(aResultNum)) : aCont;
+          ResultPtr aResCont = aCont;
+          if (aCompContext.get())
+            if (aResultNum == aSubsSize - 1)
+              aResCont = aCompContext;
+            else aResCont = aCompContext->subResult(aResultNum);
           const std::set<AttributePtr>& aRefs = aResCont->data()->refsToMe();
           std::set<AttributePtr>::const_iterator aRef = aRefs.begin();
           for(; !aFindNewContext && aRef != aRefs.end(); aRef++) {