From 82a9c047c3a7e1b50243aeed5c39f99041fcafc7 Mon Sep 17 00:00:00 2001 From: mpv Date: Mon, 15 Jan 2018 16:52:44 +0300 Subject: [PATCH] Fixed the Linux compilation --- src/Model/Model_AttributeSelection.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/Model/Model_AttributeSelection.cpp b/src/Model/Model_AttributeSelection.cpp index ad18492ce..7c86500cd 100644 --- a/src/Model/Model_AttributeSelection.cpp +++ b/src/Model/Model_AttributeSelection.cpp @@ -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& aRefs = aResCont->data()->refsToMe(); std::set::const_iterator aRef = aRefs.begin(); for(; !aFindNewContext && aRef != aRefs.end(); aRef++) { -- 2.39.2