From 645ffcdfd99edccdc6a9ca6cc3bbe8449bb145e6 Mon Sep 17 00:00:00 2001
From: Matthieu Schaller <schaller@strw.leidenuniv.nl>
Date: Mon, 10 Dec 2018 15:43:34 +0000
Subject: [PATCH] The function computing the gas temperature should not modify
 the xpart.

---
 src/cooling/EAGLE/cooling.c | 2 +-
 src/cooling/EAGLE/cooling.h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/cooling/EAGLE/cooling.c b/src/cooling/EAGLE/cooling.c
index 5324ae47de..0815b6cb82 100644
--- a/src/cooling/EAGLE/cooling.c
+++ b/src/cooling/EAGLE/cooling.c
@@ -653,7 +653,7 @@ float cooling_get_temperature(
     const struct unit_system *restrict us,
     const struct cosmology *restrict cosmo,
     const struct cooling_function_data *restrict cooling,
-    const struct part *restrict p, struct xpart *restrict xp) {
+    const struct part *restrict p, const struct xpart *restrict xp) {
 
   /* Get physical internal energy */
   const float u = hydro_get_physical_internal_energy(p, xp, cosmo);
diff --git a/src/cooling/EAGLE/cooling.h b/src/cooling/EAGLE/cooling.h
index 7485880a14..733749548d 100644
--- a/src/cooling/EAGLE/cooling.h
+++ b/src/cooling/EAGLE/cooling.h
@@ -64,7 +64,7 @@ float cooling_get_temperature(
     const struct unit_system *restrict us,
     const struct cosmology *restrict cosmo,
     const struct cooling_function_data *restrict cooling,
-    const struct part *restrict p, struct xpart *restrict xp);
+    const struct part *restrict p, const struct xpart *restrict xp);
 
 float cooling_get_radiated_energy(const struct xpart *restrict xp);
 
-- 
GitLab