From 836c1be75d1801eab4ef71eb21449e8c3cb1df3d Mon Sep 17 00:00:00 2001 From: Uwe Date: Sun, 4 Dec 2022 17:32:32 +0100 Subject: [PATCH] [Path] P-End: remove unused includes - also some sorting --- src/Mod/Path/App/Path.cpp | 16 ++-------------- src/Mod/Path/App/Path.h | 7 +++---- src/Mod/Path/App/PathPyImp.cpp | 6 ++---- src/Mod/Path/App/PathSegmentWalker.cpp | 7 ++++--- src/Mod/Path/App/PathSegmentWalker.h | 8 +++++--- src/Mod/Path/App/PropertyPath.cpp | 10 ++-------- src/Mod/Path/App/PropertyPath.h | 6 +++--- src/Mod/Path/App/Voronoi.cpp | 3 +-- src/Mod/Path/App/VoronoiCell.cpp | 3 +-- src/Mod/Path/App/VoronoiCellPyImp.cpp | 3 --- src/Mod/Path/App/VoronoiEdge.cpp | 2 -- src/Mod/Path/App/VoronoiEdgePyImp.cpp | 12 ++++-------- src/Mod/Path/App/VoronoiPyImp.cpp | 9 ++------- src/Mod/Path/App/VoronoiVertex.cpp | 2 -- src/Mod/Path/App/VoronoiVertexPyImp.cpp | 5 +---- 15 files changed, 30 insertions(+), 69 deletions(-) diff --git a/src/Mod/Path/App/Path.cpp b/src/Mod/Path/App/Path.cpp index 8357ac817f..52cfab2bc2 100644 --- a/src/Mod/Path/App/Path.cpp +++ b/src/Mod/Path/App/Path.cpp @@ -20,29 +20,17 @@ * * ***************************************************************************/ - #include "PreCompiled.h" -#ifndef _PreComp_ -# include -#endif - #include #include -#include -#include #include #include #include - -// KDL stuff - at the moment, not used -//#include "Mod/Robot/App/kdl_cp/path_line.hpp" -//#include "Mod/Robot/App/kdl_cp/path_circle.hpp" -//#include "Mod/Robot/App/kdl_cp/rotational_interpolation_sa.hpp" -//#include "Mod/Robot/App/kdl_cp/utilities/error.h" +#include #include "Path.h" -#include + using namespace Path; using namespace Base; diff --git a/src/Mod/Path/App/Path.h b/src/Mod/Path/App/Path.h index 875fea6be8..28321f906d 100644 --- a/src/Mod/Path/App/Path.h +++ b/src/Mod/Path/App/Path.h @@ -20,17 +20,16 @@ * * ***************************************************************************/ - #ifndef PATH_Path_H #define PATH_Path_H -#include "Command.h" -//#include "Mod/Robot/App/kdl_cp/path_composite.hpp" -//#include "Mod/Robot/App/kdl_cp/frames_io.hpp" #include #include #include +#include "Command.h" + + namespace Path { diff --git a/src/Mod/Path/App/PathPyImp.cpp b/src/Mod/Path/App/PathPyImp.cpp index cb6f2daca8..d118b77a1b 100644 --- a/src/Mod/Path/App/PathPyImp.cpp +++ b/src/Mod/Path/App/PathPyImp.cpp @@ -20,19 +20,17 @@ * * ***************************************************************************/ - #include "PreCompiled.h" -#include "Mod/Path/App/Path.h" +#include "Base/GeometryPyCXX.h" // inclusion of the generated files (generated out of PathPy.xml) #include "PathPy.h" #include "PathPy.cpp" -#include "Base/BoundBoxPy.h" -#include "Base/GeometryPyCXX.h" #include "CommandPy.h" + using namespace Path; // returns a string which represents the object e.g. when printed in python diff --git a/src/Mod/Path/App/PathSegmentWalker.cpp b/src/Mod/Path/App/PathSegmentWalker.cpp index 5928033eaa..bbb171419b 100644 --- a/src/Mod/Path/App/PathSegmentWalker.cpp +++ b/src/Mod/Path/App/PathSegmentWalker.cpp @@ -19,14 +19,15 @@ * * ***************************************************************************/ - #include "PreCompiled.h" -#include "PathSegmentWalker.h" + +#include #include #include -#include +#include "PathSegmentWalker.h" + #define ARC_MIN_SEGMENTS 20.0 // minimum # segments to interpolate an arc diff --git a/src/Mod/Path/App/PathSegmentWalker.h b/src/Mod/Path/App/PathSegmentWalker.h index 4bc4c4e4f4..987969a22c 100644 --- a/src/Mod/Path/App/PathSegmentWalker.h +++ b/src/Mod/Path/App/PathSegmentWalker.h @@ -22,11 +22,13 @@ #ifndef PATHSEGMENTWALKER_H #define PATHSEGMENTWALKER_H -#include -#include - #include +#include + +#include "Path.h" + + namespace Path { diff --git a/src/Mod/Path/App/PropertyPath.cpp b/src/Mod/Path/App/PropertyPath.cpp index 7281caeafc..b316a23e52 100644 --- a/src/Mod/Path/App/PropertyPath.cpp +++ b/src/Mod/Path/App/PropertyPath.cpp @@ -20,26 +20,20 @@ * * ***************************************************************************/ - #include "PreCompiled.h" - #ifndef _PreComp_ # include #endif - #include #include -#include -#include #include -#include -#include -#include +#include #include "PropertyPath.h" #include "PathPy.h" + using namespace Path; TYPESYSTEM_SOURCE(Path::PropertyPath, App::Property) diff --git a/src/Mod/Path/App/PropertyPath.h b/src/Mod/Path/App/PropertyPath.h index fea20332a2..16021ba43a 100644 --- a/src/Mod/Path/App/PropertyPath.h +++ b/src/Mod/Path/App/PropertyPath.h @@ -20,17 +20,17 @@ * * ***************************************************************************/ - #ifndef PROPERTYPATH_H #define PROPERTYPATH_H -#include "Path.h" #include +#include "Path.h" + + namespace Path { - /** The path property class. */ class PathExport PropertyPath : public App::Property { diff --git a/src/Mod/Path/App/Voronoi.cpp b/src/Mod/Path/App/Voronoi.cpp index d382da4c34..27a509c20c 100644 --- a/src/Mod/Path/App/Voronoi.cpp +++ b/src/Mod/Path/App/Voronoi.cpp @@ -20,9 +20,7 @@ * * ***************************************************************************/ - #include "PreCompiled.h" - #ifndef _PreComp_ # include #endif @@ -31,6 +29,7 @@ #include "Voronoi.h" + using namespace Base; using namespace Path; diff --git a/src/Mod/Path/App/VoronoiCell.cpp b/src/Mod/Path/App/VoronoiCell.cpp index 2e7be77b28..70671db5ba 100644 --- a/src/Mod/Path/App/VoronoiCell.cpp +++ b/src/Mod/Path/App/VoronoiCell.cpp @@ -20,12 +20,11 @@ * * ***************************************************************************/ - #include "PreCompiled.h" -#include "Voronoi.h" #include "VoronoiCell.h" + using namespace Base; using namespace Path; diff --git a/src/Mod/Path/App/VoronoiCellPyImp.cpp b/src/Mod/Path/App/VoronoiCellPyImp.cpp index b1454e0b56..abb125b9fa 100644 --- a/src/Mod/Path/App/VoronoiCellPyImp.cpp +++ b/src/Mod/Path/App/VoronoiCellPyImp.cpp @@ -25,11 +25,8 @@ #include "Base/Vector3D.h" #include "Base/VectorPy.h" -#include "Voronoi.h" -#include "VoronoiCell.h" #include "VoronoiCellPy.h" #include "VoronoiCellPy.cpp" -#include "VoronoiEdge.h" #include "VoronoiEdgePy.h" diff --git a/src/Mod/Path/App/VoronoiEdge.cpp b/src/Mod/Path/App/VoronoiEdge.cpp index 02453e259c..0e13e8190e 100644 --- a/src/Mod/Path/App/VoronoiEdge.cpp +++ b/src/Mod/Path/App/VoronoiEdge.cpp @@ -20,10 +20,8 @@ * * ***************************************************************************/ - #include "PreCompiled.h" -#include "Voronoi.h" #include "VoronoiEdge.h" diff --git a/src/Mod/Path/App/VoronoiEdgePyImp.cpp b/src/Mod/Path/App/VoronoiEdgePyImp.cpp index 7c941bdecb..efe68022bd 100644 --- a/src/Mod/Path/App/VoronoiEdgePyImp.cpp +++ b/src/Mod/Path/App/VoronoiEdgePyImp.cpp @@ -21,24 +21,20 @@ ***************************************************************************/ #include "PreCompiled.h" - #ifndef _PreComp_ -#include -#include +# include +# include #endif #include "Mod/Part/App/Geometry.h" #include "Mod/Part/App/TopoShapeEdgePy.h" -#include "Voronoi.h" -#include "VoronoiCell.h" -#include "VoronoiCellPy.h" -#include "VoronoiEdge.h" #include "VoronoiEdgePy.h" #include "VoronoiEdgePy.cpp" -#include "VoronoiVertex.h" +#include "VoronoiCellPy.h" #include "VoronoiVertexPy.h" + using namespace Path; namespace { diff --git a/src/Mod/Path/App/VoronoiPyImp.cpp b/src/Mod/Path/App/VoronoiPyImp.cpp index a724d4b4d1..6e00af1538 100644 --- a/src/Mod/Path/App/VoronoiPyImp.cpp +++ b/src/Mod/Path/App/VoronoiPyImp.cpp @@ -20,21 +20,16 @@ * * ***************************************************************************/ - #include "PreCompiled.h" #include "Base/GeometryPyCXX.h" #include "Base/Vector3D.h" #include "Base/VectorPy.h" -#include "Voronoi.h" -#include "VoronoiCell.h" -#include "VoronoiCellPy.h" -#include "VoronoiEdge.h" -#include "VoronoiEdgePy.h" #include "VoronoiPy.h" #include "VoronoiPy.cpp" -#include "VoronoiVertex.h" +#include "VoronoiCellPy.h" +#include "VoronoiEdgePy.h" #include "VoronoiVertexPy.h" diff --git a/src/Mod/Path/App/VoronoiVertex.cpp b/src/Mod/Path/App/VoronoiVertex.cpp index bd3893af9a..72a325af07 100644 --- a/src/Mod/Path/App/VoronoiVertex.cpp +++ b/src/Mod/Path/App/VoronoiVertex.cpp @@ -20,10 +20,8 @@ * * ***************************************************************************/ - #include "PreCompiled.h" -#include "Voronoi.h" #include "VoronoiVertex.h" diff --git a/src/Mod/Path/App/VoronoiVertexPyImp.cpp b/src/Mod/Path/App/VoronoiVertexPyImp.cpp index 5e116ce30d..06a9651197 100644 --- a/src/Mod/Path/App/VoronoiVertexPyImp.cpp +++ b/src/Mod/Path/App/VoronoiVertexPyImp.cpp @@ -25,12 +25,9 @@ #include "Base/Vector3D.h" #include "Base/VectorPy.h" -#include "Voronoi.h" -#include "VoronoiEdge.h" -#include "VoronoiEdgePy.h" -#include "VoronoiVertex.h" #include "VoronoiVertexPy.h" #include "VoronoiVertexPy.cpp" +#include "VoronoiEdgePy.h" using namespace Path;