From 54349c5845b43e97883d5201bdacc79cf74089b8 Mon Sep 17 00:00:00 2001 From: John Beard Date: Wed, 20 Aug 2025 15:40:27 +0800 Subject: [PATCH] Tool: minor reduction of transitive includes --- common/tool/action_menu.cpp | 13 ++++++++----- common/tool/group_tool.cpp | 3 ++- common/tool/group_tool.h | 11 ++++++----- common/tool/selection_tool.cpp | 2 -- include/tool/action_menu.h | 6 +----- include/tool/selection_tool.h | 7 ++----- 6 files changed, 19 insertions(+), 23 deletions(-) diff --git a/common/tool/action_menu.cpp b/common/tool/action_menu.cpp index 4c9e370101..903b9c9e45 100644 --- a/common/tool/action_menu.cpp +++ b/common/tool/action_menu.cpp @@ -24,22 +24,25 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ +#include "tool/action_menu.h" + +#include +#include +#include +#include +#include + #include #include #include #include #include -#include #include #include #include #include #include -#include -#include #include -#include -#include #include using namespace std::placeholders; diff --git a/common/tool/group_tool.cpp b/common/tool/group_tool.cpp index 4f94f4842f..25e781c198 100644 --- a/common/tool/group_tool.cpp +++ b/common/tool/group_tool.cpp @@ -20,14 +20,15 @@ * or you may write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ +#include "tool/group_tool.h" #include #include #include #include #include -#include #include +#include #include #include #include diff --git a/common/tool/group_tool.h b/common/tool/group_tool.h index 0c33490e1a..c63dcb4de9 100644 --- a/common/tool/group_tool.h +++ b/common/tool/group_tool.h @@ -21,13 +21,16 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ -#ifndef GROUP_TOOL_H -#define GROUP_TOOL_H +#pragma once -#include +#include class COMMIT; class DIALOG_GROUP_PROPERTIES; +class EDA_DRAW_FRAME; +class EDA_GROUP; +class SELECTION_TOOL; + class GROUP_TOOL : public TOOL_INTERACTIVE { @@ -80,5 +83,3 @@ protected: SELECTION_TOOL* m_selectionTool = nullptr; std::shared_ptr m_commit; }; - -#endif diff --git a/common/tool/selection_tool.cpp b/common/tool/selection_tool.cpp index 2a551ac73e..34e69530c4 100644 --- a/common/tool/selection_tool.cpp +++ b/common/tool/selection_tool.cpp @@ -427,5 +427,3 @@ bool SELECTION_TOOL::doSelectionMenu( COLLECTOR* aCollector ) return false; } - - diff --git a/include/tool/action_menu.h b/include/tool/action_menu.h index ca04781cc6..fc8afd29f0 100644 --- a/include/tool/action_menu.h +++ b/include/tool/action_menu.h @@ -25,15 +25,13 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ -#ifndef __CONTEXT_MENU_H -#define __CONTEXT_MENU_H +#pragma once #include #include #include #include -#include #include class KIFACE_BASE; @@ -285,5 +283,3 @@ protected: friend class TOOL_INTERACTIVE; }; - -#endif diff --git a/include/tool/selection_tool.h b/include/tool/selection_tool.h index 031039c3ee..9064e77146 100644 --- a/include/tool/selection_tool.h +++ b/include/tool/selection_tool.h @@ -22,12 +22,11 @@ */ #pragma once -#ifndef INCLUDE_TOOL_SELECTION_TOOL_H_ -#define INCLUDE_TOOL_SELECTION_TOOL_H_ + +#include #include #include -#include #include class COLLECTOR; @@ -166,5 +165,3 @@ protected: VECTOR2I m_originalCursor; ///< Location of original cursor when starting click. }; - -#endif /* INCLUDE_TOOL_SELECTION_TOOL_H_ */