From 42a7b9c6451f6a98daf5bda7e36ed59e02b5d5a4 Mon Sep 17 00:00:00 2001 From: Matthieu Schaller <schaller@strw.leidenuniv.nl> Date: Mon, 28 Oct 2019 16:08:52 +0100 Subject: [PATCH] Fix a few unnecessary header inclusions to avoid inclusion loops. --- src/collectgroup.c | 1 + src/engine.c | 2 +- src/engine.h | 7 ++----- src/engine_collect_end_of_step.c | 1 + src/runner_doiact_hydro.c | 1 + src/space.h | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/collectgroup.c b/src/collectgroup.c index af140c9150..6b096416a3 100644 --- a/src/collectgroup.c +++ b/src/collectgroup.c @@ -31,6 +31,7 @@ /* Local headers. */ #include "engine.h" #include "error.h" +#include "star_formation_logger.h" #ifdef WITH_MPI diff --git a/src/engine.c b/src/engine.c index 9728fe706f..a226472af3 100644 --- a/src/engine.c +++ b/src/engine.c @@ -51,6 +51,7 @@ /* Local headers. */ #include "active.h" #include "atomic.h" +#include "black_holes.h" #include "cell.h" #include "chemistry.h" #include "clocks.h" @@ -83,7 +84,6 @@ #include "sort_part.h" #include "star_formation.h" #include "star_formation_logger.h" -#include "star_formation_logger_struct.h" #include "stars_io.h" #include "statistics.h" #include "timers.h" diff --git a/src/engine.h b/src/engine.h index 772f4c5330..7c155c6e92 100644 --- a/src/engine.h +++ b/src/engine.h @@ -34,13 +34,9 @@ /* Includes. */ #include "barrier.h" -#include "black_holes_properties.h" -#include "chemistry_struct.h" #include "clocks.h" #include "collectgroup.h" -#include "cooling_struct.h" #include "dump.h" -#include "gravity_properties.h" #include "mesh_gravity.h" #include "parser.h" #include "partition.h" @@ -48,11 +44,12 @@ #include "runner.h" #include "scheduler.h" #include "space.h" -#include "star_formation_logger.h" #include "task.h" #include "units.h" #include "velociraptor_interface.h" +struct black_holes_properties; + /** * @brief The different policies the #engine can follow. */ diff --git a/src/engine_collect_end_of_step.c b/src/engine_collect_end_of_step.c index ec02acfefd..d4d3251041 100644 --- a/src/engine_collect_end_of_step.c +++ b/src/engine_collect_end_of_step.c @@ -27,6 +27,7 @@ /* Local headers. */ #include "active.h" +#include "star_formation_logger.h" #include "timeline.h" /** diff --git a/src/runner_doiact_hydro.c b/src/runner_doiact_hydro.c index 4638513c71..631109ac46 100644 --- a/src/runner_doiact_hydro.c +++ b/src/runner_doiact_hydro.c @@ -25,6 +25,7 @@ /* Local headers. */ #include "active.h" #include "cell.h" +#include "chemistry.h" #include "engine.h" #include "pressure_floor_iact.h" #include "runner.h" diff --git a/src/space.h b/src/space.h index 8743e9aae4..94f51fcbe1 100644 --- a/src/space.h +++ b/src/space.h @@ -30,7 +30,6 @@ #include <stddef.h> /* Includes. */ -#include "gravity_properties.h" #include "hydro_space.h" #include "lock.h" #include "parser.h" @@ -40,6 +39,7 @@ /* Avoid cyclic inclusions */ struct cell; struct cosmology; +struct gravity_props; /* Some constants. */ #define space_cellallocchunk 1000 -- GitLab