From 28388f70550a58502e96295e748d817c603f4a6c Mon Sep 17 00:00:00 2001 From: Matthieu Schaller <matthieu.schaller@durham.ac.uk> Date: Tue, 16 Aug 2016 17:54:33 +0100 Subject: [PATCH] Proper header-guards for the gravity files. --- src/gravity/Default/gravity.h | 4 ++++ src/gravity/Default/gravity_debug.h | 4 ++++ src/gravity/Default/gravity_iact.h | 6 +++--- src/gravity/Default/gravity_io.h | 4 ++++ src/gravity/Default/gravity_part.h | 5 +++++ 5 files changed, 20 insertions(+), 3 deletions(-) diff --git a/src/gravity/Default/gravity.h b/src/gravity/Default/gravity.h index 755d4be527..f9b67c9633 100644 --- a/src/gravity/Default/gravity.h +++ b/src/gravity/Default/gravity.h @@ -17,6 +17,8 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. * ******************************************************************************/ +#ifndef SWIFT_DEFAULT_GRAVITY_H +#define SWIFT_DEFAULT_GRAVITY_H #include <float.h> #include "potentials.h" @@ -151,3 +153,5 @@ __attribute__((always_inline)) INLINE static void external_gravity( */ __attribute__((always_inline)) INLINE static void gravity_kick_extra( struct gpart* gp, float dt, float half_dt) {} + +#endif /* SWIFT_DEFAULT_GRAVITY_H */ diff --git a/src/gravity/Default/gravity_debug.h b/src/gravity/Default/gravity_debug.h index 7cf375a1fd..c284f543b3 100644 --- a/src/gravity/Default/gravity_debug.h +++ b/src/gravity/Default/gravity_debug.h @@ -16,6 +16,8 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. * ******************************************************************************/ +#ifndef SWIFT_DEFAULT_GRAVITY_DEBUG_H +#define SWIFT_DEFAULT_GRAVITY_DEBUG_H __attribute__((always_inline)) INLINE static void gravity_debug_particle( const struct gpart* p) { @@ -27,3 +29,5 @@ __attribute__((always_inline)) INLINE static void gravity_debug_particle( p->a_grav[0], p->a_grav[1], p->a_grav[2], p->mass, p->ti_begin, p->ti_end); } + +#endif /* SWIFT_DEFAULT_GRAVITY_DEBUG_H */ diff --git a/src/gravity/Default/gravity_iact.h b/src/gravity/Default/gravity_iact.h index aa285ce324..7c7c5b9d24 100644 --- a/src/gravity/Default/gravity_iact.h +++ b/src/gravity/Default/gravity_iact.h @@ -17,8 +17,8 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. * ******************************************************************************/ -#ifndef SWIFT_RUNNER_IACT_GRAV_H -#define SWIFT_RUNNER_IACT_GRAV_H +#ifndef SWIFT_DEFAULT_GRAVITY_IACT_H +#define SWIFT_DEFAULT_GRAVITY_IACT_H /* Includes. */ #include "const.h" @@ -188,4 +188,4 @@ __attribute__((always_inline)) INLINE static void runner_iact_grav_pm( #endif } -#endif /* SWIFT_RUNNER_IACT_GRAV_H */ +#endif /* SWIFT_DEFAULT_GRAVITY_IACT_H */ diff --git a/src/gravity/Default/gravity_io.h b/src/gravity/Default/gravity_io.h index e0fd15a91b..26eed8a0a6 100644 --- a/src/gravity/Default/gravity_io.h +++ b/src/gravity/Default/gravity_io.h @@ -16,6 +16,8 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. * ******************************************************************************/ +#ifndef SWIFT_DEFAULT_GRAVITY_IO_H +#define SWIFT_DEFAULT_GRAVITY_IO_H #include "io_properties.h" @@ -68,3 +70,5 @@ void darkmatter_write_particles(struct gpart* gparts, struct io_props* list, list[4] = io_make_output_field("Acceleration", FLOAT, 3, UNIT_CONV_ACCELERATION, gparts, a_grav); } + +#endif /* SWIFT_DEFAULT_GRAVITY_IO_H */ diff --git a/src/gravity/Default/gravity_part.h b/src/gravity/Default/gravity_part.h index 77e6543429..1850ff0a16 100644 --- a/src/gravity/Default/gravity_part.h +++ b/src/gravity/Default/gravity_part.h @@ -16,6 +16,9 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. * ******************************************************************************/ +#ifndef SWIFT_DEFAULT_GRAVITY_PART_H +#define SWIFT_DEFAULT_GRAVITY_PART_H + /* Some standard headers. */ #include <stdlib.h> @@ -51,3 +54,5 @@ struct gpart { long long id_or_neg_offset; } __attribute__((aligned(gpart_align))); + +#endif /* SWIFT_DEFAULT_GRAVITY_PART_H */ -- GitLab