From 8c4527dca9eb76442be90ad90f981897f8ac3afe Mon Sep 17 00:00:00 2001 From: Alex Bilger Date: Sat, 21 Dec 2024 10:10:33 +0100 Subject: [PATCH] include modules.h only when necessary --- .../Detection/src/sofa/component/collision/detection/init.cpp | 1 + .../Response/src/sofa/component/collision/response/init.cpp | 1 + Sofa/Component/Collision/src/sofa/component/collision/init.cpp | 1 + .../src/sofa/component/constraint/lagrangian/init.cpp | 1 + .../Component/Constraint/src/sofa/component/constraint/init.cpp | 1 + Sofa/Component/Engine/src/sofa/component/engine/init.cpp | 1 + Sofa/Component/IO/src/sofa/component/io/init.cpp | 1 + .../LinearSolver/src/sofa/component/linearsolver/init.cpp | 1 + Sofa/Component/Mapping/src/sofa/component/mapping/init.cpp | 1 + Sofa/Component/ODESolver/src/sofa/component/odesolver/init.cpp | 1 + .../FEM/src/sofa/component/solidmechanics/fem/init.cpp | 1 + .../SolidMechanics/src/sofa/component/solidmechanics/init.cpp | 1 + .../Container/src/sofa/component/topology/container/init.cpp | 1 + .../src/sofa/component/topology/testing/fake_TopologyScene.h | 1 + Sofa/Component/Topology/src/sofa/component/topology/init.cpp | 1 + Sofa/Component/src/sofa/component/init.cpp | 1 + Sofa/Component/test/Modules_test.h.in | 1 + Sofa/framework/Config/src/sofa/config.h.in | 1 - Sofa/framework/Core/test/ObjectFactoryJson_test.cpp | 1 + Sofa/framework/Helper/src/sofa/helper/ComponentChange.cpp | 2 +- Sofa/framework/Testing/src/sofa/testing/BaseTest.h | 1 + .../test/ParallelImplementationsRegistry_test.cpp | 1 + .../plugins/SceneCreator/src/SceneCreator/SceneCreator.cpp | 1 + 23 files changed, 22 insertions(+), 2 deletions(-) diff --git a/Sofa/Component/Collision/Detection/src/sofa/component/collision/detection/init.cpp b/Sofa/Component/Collision/Detection/src/sofa/component/collision/detection/init.cpp index 3c861365f7c..e7e10ae60ce 100644 --- a/Sofa/Component/Collision/Detection/src/sofa/component/collision/detection/init.cpp +++ b/Sofa/Component/Collision/Detection/src/sofa/component/collision/detection/init.cpp @@ -26,6 +26,7 @@ #include #include +#include namespace sofa::component::collision::detection { diff --git a/Sofa/Component/Collision/Response/src/sofa/component/collision/response/init.cpp b/Sofa/Component/Collision/Response/src/sofa/component/collision/response/init.cpp index b4110a6d427..79fd36c7bd4 100644 --- a/Sofa/Component/Collision/Response/src/sofa/component/collision/response/init.cpp +++ b/Sofa/Component/Collision/Response/src/sofa/component/collision/response/init.cpp @@ -26,6 +26,7 @@ #include #include +#include namespace sofa::component::collision::response { diff --git a/Sofa/Component/Collision/src/sofa/component/collision/init.cpp b/Sofa/Component/Collision/src/sofa/component/collision/init.cpp index 1dfa2166bd5..1423e912ea0 100644 --- a/Sofa/Component/Collision/src/sofa/component/collision/init.cpp +++ b/Sofa/Component/Collision/src/sofa/component/collision/init.cpp @@ -27,6 +27,7 @@ #include #include +#include namespace sofa::component::collision { diff --git a/Sofa/Component/Constraint/Lagrangian/src/sofa/component/constraint/lagrangian/init.cpp b/Sofa/Component/Constraint/Lagrangian/src/sofa/component/constraint/lagrangian/init.cpp index 1abb1e0b01a..e7adc9e8fe9 100644 --- a/Sofa/Component/Constraint/Lagrangian/src/sofa/component/constraint/lagrangian/init.cpp +++ b/Sofa/Component/Constraint/Lagrangian/src/sofa/component/constraint/lagrangian/init.cpp @@ -27,6 +27,7 @@ #include #include +#include namespace sofa::component::constraint::lagrangian { diff --git a/Sofa/Component/Constraint/src/sofa/component/constraint/init.cpp b/Sofa/Component/Constraint/src/sofa/component/constraint/init.cpp index 4dcff0b8c71..f122b9422be 100644 --- a/Sofa/Component/Constraint/src/sofa/component/constraint/init.cpp +++ b/Sofa/Component/Constraint/src/sofa/component/constraint/init.cpp @@ -26,6 +26,7 @@ #include #include +#include namespace sofa::component::constraint { diff --git a/Sofa/Component/Engine/src/sofa/component/engine/init.cpp b/Sofa/Component/Engine/src/sofa/component/engine/init.cpp index 6e875bcf459..4ffe472034e 100644 --- a/Sofa/Component/Engine/src/sofa/component/engine/init.cpp +++ b/Sofa/Component/Engine/src/sofa/component/engine/init.cpp @@ -28,6 +28,7 @@ #include #include +#include namespace sofa::component::engine { diff --git a/Sofa/Component/IO/src/sofa/component/io/init.cpp b/Sofa/Component/IO/src/sofa/component/io/init.cpp index 0a36106bd83..cf13bfd0001 100644 --- a/Sofa/Component/IO/src/sofa/component/io/init.cpp +++ b/Sofa/Component/IO/src/sofa/component/io/init.cpp @@ -25,6 +25,7 @@ #include #include +#include namespace sofa::component::io { diff --git a/Sofa/Component/LinearSolver/src/sofa/component/linearsolver/init.cpp b/Sofa/Component/LinearSolver/src/sofa/component/linearsolver/init.cpp index 8e5517100dc..e4f74f3fe12 100644 --- a/Sofa/Component/LinearSolver/src/sofa/component/linearsolver/init.cpp +++ b/Sofa/Component/LinearSolver/src/sofa/component/linearsolver/init.cpp @@ -28,6 +28,7 @@ #include #include +#include namespace sofa::component::linearsolver { diff --git a/Sofa/Component/Mapping/src/sofa/component/mapping/init.cpp b/Sofa/Component/Mapping/src/sofa/component/mapping/init.cpp index 970d2271cda..82a3fa98dab 100644 --- a/Sofa/Component/Mapping/src/sofa/component/mapping/init.cpp +++ b/Sofa/Component/Mapping/src/sofa/component/mapping/init.cpp @@ -25,6 +25,7 @@ #include #include +#include namespace sofa::component::mapping { diff --git a/Sofa/Component/ODESolver/src/sofa/component/odesolver/init.cpp b/Sofa/Component/ODESolver/src/sofa/component/odesolver/init.cpp index 459722fe766..4c86bf81b18 100644 --- a/Sofa/Component/ODESolver/src/sofa/component/odesolver/init.cpp +++ b/Sofa/Component/ODESolver/src/sofa/component/odesolver/init.cpp @@ -26,6 +26,7 @@ #include #include +#include namespace sofa::component::odesolver { diff --git a/Sofa/Component/SolidMechanics/FEM/src/sofa/component/solidmechanics/fem/init.cpp b/Sofa/Component/SolidMechanics/FEM/src/sofa/component/solidmechanics/fem/init.cpp index f516db02ce2..9e60a6ad828 100644 --- a/Sofa/Component/SolidMechanics/FEM/src/sofa/component/solidmechanics/fem/init.cpp +++ b/Sofa/Component/SolidMechanics/FEM/src/sofa/component/solidmechanics/fem/init.cpp @@ -27,6 +27,7 @@ #include #include +#include namespace sofa::component::solidmechanics::fem { diff --git a/Sofa/Component/SolidMechanics/src/sofa/component/solidmechanics/init.cpp b/Sofa/Component/SolidMechanics/src/sofa/component/solidmechanics/init.cpp index 2f2aabc0fa5..8638bbdb020 100644 --- a/Sofa/Component/SolidMechanics/src/sofa/component/solidmechanics/init.cpp +++ b/Sofa/Component/SolidMechanics/src/sofa/component/solidmechanics/init.cpp @@ -27,6 +27,7 @@ #include #include +#include namespace sofa::component::solidmechanics { diff --git a/Sofa/Component/Topology/Container/src/sofa/component/topology/container/init.cpp b/Sofa/Component/Topology/Container/src/sofa/component/topology/container/init.cpp index 1d18491b490..bd43c782876 100644 --- a/Sofa/Component/Topology/Container/src/sofa/component/topology/container/init.cpp +++ b/Sofa/Component/Topology/Container/src/sofa/component/topology/container/init.cpp @@ -27,6 +27,7 @@ #include #include +#include namespace sofa::component::topology::container { diff --git a/Sofa/Component/Topology/Testing/src/sofa/component/topology/testing/fake_TopologyScene.h b/Sofa/Component/Topology/Testing/src/sofa/component/topology/testing/fake_TopologyScene.h index 0d8ba51e6e0..fe2283294da 100644 --- a/Sofa/Component/Topology/Testing/src/sofa/component/topology/testing/fake_TopologyScene.h +++ b/Sofa/Component/Topology/Testing/src/sofa/component/topology/testing/fake_TopologyScene.h @@ -25,6 +25,7 @@ #include #include #include +#include class fake_TopologyScene { diff --git a/Sofa/Component/Topology/src/sofa/component/topology/init.cpp b/Sofa/Component/Topology/src/sofa/component/topology/init.cpp index ecd591b3d73..550085ae7c1 100644 --- a/Sofa/Component/Topology/src/sofa/component/topology/init.cpp +++ b/Sofa/Component/Topology/src/sofa/component/topology/init.cpp @@ -27,6 +27,7 @@ #include #include +#include namespace sofa::component::topology { diff --git a/Sofa/Component/src/sofa/component/init.cpp b/Sofa/Component/src/sofa/component/init.cpp index 8db17d8be65..6e1494deb84 100644 --- a/Sofa/Component/src/sofa/component/init.cpp +++ b/Sofa/Component/src/sofa/component/init.cpp @@ -45,6 +45,7 @@ #include #include +#include namespace sofa::component { diff --git a/Sofa/Component/test/Modules_test.h.in b/Sofa/Component/test/Modules_test.h.in index dffaf71dcd5..85dd4b6b3bf 100644 --- a/Sofa/Component/test/Modules_test.h.in +++ b/Sofa/Component/test/Modules_test.h.in @@ -20,5 +20,6 @@ * Contact information: contact@sofa-framework.org * ******************************************************************************/ #include +#include #cmakedefine ALL_SOFA_MODULES @ALL_SOFA_MODULES@ diff --git a/Sofa/framework/Config/src/sofa/config.h.in b/Sofa/framework/Config/src/sofa/config.h.in index 0d3019e404e..ccd35844237 100644 --- a/Sofa/framework/Config/src/sofa/config.h.in +++ b/Sofa/framework/Config/src/sofa/config.h.in @@ -24,7 +24,6 @@ #include #include #include -#include #include // For nullptr #include // std::numeric_limits<> diff --git a/Sofa/framework/Core/test/ObjectFactoryJson_test.cpp b/Sofa/framework/Core/test/ObjectFactoryJson_test.cpp index aab22b02e71..ce051811eb5 100644 --- a/Sofa/framework/Core/test/ObjectFactoryJson_test.cpp +++ b/Sofa/framework/Core/test/ObjectFactoryJson_test.cpp @@ -25,6 +25,7 @@ #include #include #include +#include namespace sofa diff --git a/Sofa/framework/Helper/src/sofa/helper/ComponentChange.cpp b/Sofa/framework/Helper/src/sofa/helper/ComponentChange.cpp index 73ec4357ccf..29d9abf57d8 100644 --- a/Sofa/framework/Helper/src/sofa/helper/ComponentChange.cpp +++ b/Sofa/framework/Helper/src/sofa/helper/ComponentChange.cpp @@ -20,7 +20,7 @@ * Contact information: contact@sofa-framework.org * ******************************************************************************/ #include - +#include namespace sofa::helper::lifecycle { diff --git a/Sofa/framework/Testing/src/sofa/testing/BaseTest.h b/Sofa/framework/Testing/src/sofa/testing/BaseTest.h index 1ec7c55dd14..c08ba684732 100644 --- a/Sofa/framework/Testing/src/sofa/testing/BaseTest.h +++ b/Sofa/framework/Testing/src/sofa/testing/BaseTest.h @@ -22,6 +22,7 @@ #pragma once #include +#include #include #include diff --git a/applications/plugins/MultiThreading/test/ParallelImplementationsRegistry_test.cpp b/applications/plugins/MultiThreading/test/ParallelImplementationsRegistry_test.cpp index 6ed44fd1a0f..c64e2549a36 100644 --- a/applications/plugins/MultiThreading/test/ParallelImplementationsRegistry_test.cpp +++ b/applications/plugins/MultiThreading/test/ParallelImplementationsRegistry_test.cpp @@ -23,6 +23,7 @@ #include #include #include +#include #include diff --git a/applications/plugins/SceneCreator/src/SceneCreator/SceneCreator.cpp b/applications/plugins/SceneCreator/src/SceneCreator/SceneCreator.cpp index 1ba41bccbc7..943f28fbb1c 100644 --- a/applications/plugins/SceneCreator/src/SceneCreator/SceneCreator.cpp +++ b/applications/plugins/SceneCreator/src/SceneCreator/SceneCreator.cpp @@ -21,6 +21,7 @@ ******************************************************************************/ #include "SceneCreator.h" #include +#include #include #include