From e968d966a5b45eb8a5eb4ca39dcc6c00c5fff252 Mon Sep 17 00:00:00 2001
From: Matthieu Schaller <schaller@strw.leidenuniv.nl>
Date: Sat, 8 Dec 2018 17:01:23 +0100
Subject: [PATCH] Correct header guards and remove unnecessary includes.

---
 src/cooling/EAGLE/cooling_rates.h |  5 +++++
 src/cooling/EAGLE/interpolate.h   | 15 ++-------------
 tests/testCooling.c               |  9 ++-------
 3 files changed, 9 insertions(+), 20 deletions(-)

diff --git a/src/cooling/EAGLE/cooling_rates.h b/src/cooling/EAGLE/cooling_rates.h
index a0267eb211..56196f50ba 100644
--- a/src/cooling/EAGLE/cooling_rates.h
+++ b/src/cooling/EAGLE/cooling_rates.h
@@ -18,6 +18,9 @@
  ******************************************************************************/
 
 /* Config parameters. */
+#ifndef SWIFT_EAGLE_COOLING_RATES_H
+#define SWIFT_EAGLE_COOLING_RATES_H
+
 #include "../config.h"
 
 /* Local includes. */
@@ -714,3 +717,5 @@ INLINE static double eagle_cooling_rate(
                                   d_He, cooling, dLambdaNet_du,
                                   /*element_lambda=*/NULL);
 }
+
+#endif /* SWIFT_EAGLE_COOLING_RATES_H */
diff --git a/src/cooling/EAGLE/interpolate.h b/src/cooling/EAGLE/interpolate.h
index 103bda94d9..c347907905 100644
--- a/src/cooling/EAGLE/interpolate.h
+++ b/src/cooling/EAGLE/interpolate.h
@@ -27,23 +27,12 @@
 /* Config parameters. */
 #include "../config.h"
 
-/* Some standard headers. */
-#include <float.h>
-#include <hdf5.h>
-#include <math.h>
-#include <time.h>
-
 /* Local includes. */
-#include "chemistry.h"
+#include "align.h"
 #include "cooling_struct.h"
 #include "eagle_cool_tables.h"
 #include "error.h"
-#include "hydro.h"
-#include "io_properties.h"
-#include "parser.h"
-#include "part.h"
-#include "physical_constants.h"
-#include "units.h"
+#include "inline.h"
 
 /**
  * @brief Returns the 1d index of element with 2d indices x,y
diff --git a/tests/testCooling.c b/tests/testCooling.c
index 1c7ec40fff..727a9638b0 100644
--- a/tests/testCooling.c
+++ b/tests/testCooling.c
@@ -16,15 +16,10 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  ******************************************************************************/
+#include "../config.h"
 
-#include <unistd.h>
-#include "cooling.h"
-#include "cooling/EAGLE/interpolate.h"
-#include "cooling_struct.h"
-#include "hydro.h"
-#include "physical_constants.h"
+/* Local headers. */
 #include "swift.h"
-#include "units.h"
 
 #if 0
 
-- 
GitLab