From 12b16dfdcc9fae7f8e0f35514fb8c55ffc7709a9 Mon Sep 17 00:00:00 2001 From: Artem Zhidkov Date: Sat, 27 Jun 2020 20:43:48 +0300 Subject: [PATCH] Meet coding style (split lines longer than 100 characters) --- src/Model/Model_AttributeSelection.cpp | 3 ++- src/Model/Model_AttributeSelection.h | 3 ++- src/Model/Model_Document.h | 4 +++- src/PartSet/PartSet_MenuMgr.cpp | 4 ++-- src/PartSet/PartSet_SketcherReentrantMgr.h | 3 ++- src/SketchAPI/SketchAPI_BSpline.cpp | 3 ++- src/SketchPlugin/SketchPlugin_Offset.cpp | 3 ++- src/SketcherPrs/SketcherPrs_Offset.h | 3 ++- 8 files changed, 17 insertions(+), 9 deletions(-) diff --git a/src/Model/Model_AttributeSelection.cpp b/src/Model/Model_AttributeSelection.cpp index 88912aaca..3127aeb85 100644 --- a/src/Model/Model_AttributeSelection.cpp +++ b/src/Model/Model_AttributeSelection.cpp @@ -1914,7 +1914,8 @@ bool Model_AttributeSelection::restoreContext(std::wstring theName, // name in PartSet? aDoc = std::dynamic_pointer_cast( ModelAPI_Session::get()->moduleDocument()); - if (theName.find(ModelAPI_Tools::toWString(aDoc->kind())) == 0) { // remove the document identifier from name if exists + if (theName.find(ModelAPI_Tools::toWString(aDoc->kind())) == 0) { + // remove the document identifier from name if exists aSubShapeName = theName.substr(aDoc->kind().size() + 1); aName = aSubShapeName; std::string::size_type n = aName.find('/'); diff --git a/src/Model/Model_AttributeSelection.h b/src/Model/Model_AttributeSelection.h index 3b718a223..0723ef3e1 100644 --- a/src/Model/Model_AttributeSelection.h +++ b/src/Model/Model_AttributeSelection.h @@ -48,7 +48,8 @@ class Model_AttributeSelection : public ModelAPI_AttributeSelection, /// Reference to the parent attribute, if any (to split selection compounds in issue 1799) Model_AttributeSelectionList* myParent; - std::shared_ptr myRestoreDocument; // current document to restore by name + /// current document to restore by name + std::shared_ptr myRestoreDocument; /// If true attribute selects geometry instead of shape. bool myIsGeometricalSelection; diff --git a/src/Model/Model_Document.h b/src/Model/Model_Document.h index 5239524e1..9055af38f 100644 --- a/src/Model/Model_Document.h +++ b/src/Model/Model_Document.h @@ -284,7 +284,9 @@ class Model_Document : public ModelAPI_Document int numberOfNameInHistory(const ObjectPtr& theNameObject, const TDF_Label& theStartFrom); //! Returns the result by name of the result (names of results must be unique, used for naming //! selection by name. - ResultPtr findByName(std::wstring& theName, std::wstring& theSubShapeName, bool& theUniqueContext); + ResultPtr findByName(std::wstring& theName, + std::wstring& theSubShapeName, + bool& theUniqueContext); ///! Returns all features of the document including the hidden features which are not in ///! history. Not very fast method, for calling once, not in big cycles. diff --git a/src/PartSet/PartSet_MenuMgr.cpp b/src/PartSet/PartSet_MenuMgr.cpp index 7eca18749..911273a6c 100644 --- a/src/PartSet/PartSet_MenuMgr.cpp +++ b/src/PartSet/PartSet_MenuMgr.cpp @@ -319,8 +319,8 @@ void PartSet_MenuMgr::onLineDetach(QAction* theAction) XGUI_Workshop* aWorkshop = aConnector->workshop(); ModuleBase_Operation* anOperation = myModule->workshop()->currentOperation(); - ModuleBase_Operation* anOpAction = - new ModuleBase_Operation(tr("Detach %1").arg(QString::fromStdWString(aLine->data()->name())), myModule); + ModuleBase_Operation* anOpAction = new ModuleBase_Operation(tr("Detach %1").arg( + QString::fromStdWString(aLine->data()->name())), myModule); bool isSketchOp = PartSet_SketcherMgr::isSketchOperation(anOperation); XGUI_OperationMgr* anOpMgr = aConnector->workshop()->operationMgr(); // the active nested sketch operation should be aborted unconditionally diff --git a/src/PartSet/PartSet_SketcherReentrantMgr.h b/src/PartSet/PartSet_SketcherReentrantMgr.h index c11f56bcf..c64d1fe93 100644 --- a/src/PartSet/PartSet_SketcherReentrantMgr.h +++ b/src/PartSet/PartSet_SketcherReentrantMgr.h @@ -242,7 +242,8 @@ private: std::shared_ptr myClickedSketchPoint; /// cashed clicked point bool myIsAutoConstraints; - void* myLastAutoConstraint; //< Stores address of last automatic constraint. Connot be used as a pointer!!! + void* myLastAutoConstraint; //< Stores address of last automatic constraint. + //< Cannot be used as a pointer!!! }; #endif diff --git a/src/SketchAPI/SketchAPI_BSpline.cpp b/src/SketchAPI/SketchAPI_BSpline.cpp index 2280396c1..c6667c55f 100644 --- a/src/SketchAPI/SketchAPI_BSpline.cpp +++ b/src/SketchAPI/SketchAPI_BSpline.cpp @@ -155,7 +155,8 @@ static void createPole(const CompositeFeaturePtr& theSketch, aPointFeature->execute(); std::wostringstream aName; - aName << theBSpline->name() << "_" << ModelAPI_Tools::toWString(thePoles->id()) << "_" << thePoleIndex; + aName << theBSpline->name() << "_" << ModelAPI_Tools::toWString(thePoles->id()) + << "_" << thePoleIndex; aPointFeature->data()->setName(aName.str()); aPointFeature->lastResult()->data()->setName(aName.str()); diff --git a/src/SketchPlugin/SketchPlugin_Offset.cpp b/src/SketchPlugin/SketchPlugin_Offset.cpp index 30de8d22c..e434164ac 100644 --- a/src/SketchPlugin/SketchPlugin_Offset.cpp +++ b/src/SketchPlugin/SketchPlugin_Offset.cpp @@ -564,7 +564,8 @@ void SketchPlugin_Offset::updateExistentOrCreateNew(const GeomShapePtr& theShape (theFeature->attribute(SketchPlugin_Ellipse::CENTER_ID()))->setValue(aCP); std::dynamic_pointer_cast (theFeature->attribute(SketchPlugin_Ellipse::FIRST_FOCUS_ID()))->setValue(aFocus); - theFeature->real(SketchPlugin_Ellipse::MINOR_RADIUS_ID())->setValue(anEllipseEdge->minorRadius()); + theFeature->real(SketchPlugin_Ellipse::MINOR_RADIUS_ID())->setValue( + anEllipseEdge->minorRadius()); } } else { diff --git a/src/SketcherPrs/SketcherPrs_Offset.h b/src/SketcherPrs/SketcherPrs_Offset.h index b890317b8..04e7d76de 100644 --- a/src/SketcherPrs/SketcherPrs_Offset.h +++ b/src/SketcherPrs/SketcherPrs_Offset.h @@ -40,7 +40,8 @@ public: SketchPlugin_Sketch* theSketcher); DEFINE_STANDARD_RTTIEXT(SketcherPrs_Offset, SketcherPrs_SymbolPrs) - /// Returns true if the constraint feature arguments are correcly filled to build AIS presentation + /// Returns true if the constraint feature arguments are correcly + /// filled to build AIS presentation /// \param theConstraint a constraint feature /// \param thePlane a coordinate plane of current sketch /// \return boolean result value -- 2.39.2