From: azv Date: Mon, 3 Dec 2018 09:53:12 +0000 (+0300) Subject: [Code coverage SketchSolver]: remove unused lines of code X-Git-Tag: End2018~124 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=bc96a2749a5812651a648ed4ab8c210dc91b977c;p=modules%2Fshaper.git [Code coverage SketchSolver]: remove unused lines of code --- diff --git a/src/SketchSolver/SketchSolver_Storage.cpp b/src/SketchSolver/SketchSolver_Storage.cpp index 33fea2149..55ef5f31b 100644 --- a/src/SketchSolver/SketchSolver_Storage.cpp +++ b/src/SketchSolver/SketchSolver_Storage.cpp @@ -94,41 +94,12 @@ void SketchSolver_Storage::addConstraint(ConstraintPtr theConstraint, theConstraint->data()->blockSendAttributeUpdated(myEventsBlocked); } -static std::list pointAttributes(FeaturePtr theFeature) -{ - std::list aPoints; - if (!theFeature->data() || !theFeature->data()->isValid()) - return aPoints; - if (theFeature->getKind() == SketchPlugin_Arc::ID()) { - aPoints.push_back(theFeature->attribute(SketchPlugin_Arc::CENTER_ID())); - aPoints.push_back(theFeature->attribute(SketchPlugin_Arc::START_ID())); - aPoints.push_back(theFeature->attribute(SketchPlugin_Arc::END_ID())); - } - else if (theFeature->getKind() == SketchPlugin_Circle::ID()) - aPoints.push_back(theFeature->attribute(SketchPlugin_Circle::CENTER_ID())); - else if (theFeature->getKind() == SketchPlugin_Line::ID()) { - aPoints.push_back(theFeature->attribute(SketchPlugin_Line::START_ID())); - aPoints.push_back(theFeature->attribute(SketchPlugin_Line::END_ID())); - } - else if (theFeature->getKind() == SketchPlugin_Point::ID() || - theFeature->getKind() == SketchPlugin_IntersectionPoint::ID()) - aPoints.push_back(theFeature->attribute(SketchPlugin_Point::COORD_ID())); - return aPoints; -} - void SketchSolver_Storage::addEntity(FeaturePtr theFeature, EntityWrapperPtr theSolverEntity) { if (theSolverEntity) { myFeatureMap[theFeature] = theSolverEntity; setNeedToResolve(true); - } else { - // feature links to the empty entity, add its attributes - std::list aPntAttrs = pointAttributes(theFeature); - std::list::const_iterator anAttrIt = aPntAttrs.begin(); - for (; anAttrIt != aPntAttrs.end(); ++anAttrIt) - addEntity(*anAttrIt, EntityWrapperPtr()); - myFeatureMap[theFeature] = theSolverEntity; } // block events if necessary