From 46a42aaba4f826f3a96fd9f29d9f7f26e332584f Mon Sep 17 00:00:00 2001
From: Matthieu Schaller <schaller@strw.leidenuniv.nl>
Date: Tue, 23 Oct 2018 22:59:41 +0200
Subject: [PATCH] Pass the dimension as a fixed size array and not just a
 pointer.

---
 src/fof.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/fof.c b/src/fof.c
index 957305b70f..88016b54cf 100644
--- a/src/fof.c
+++ b/src/fof.c
@@ -287,7 +287,7 @@ __attribute__((always_inline)) INLINE static void fof_union(size_t *root_i, cons
 /* Find the shortest distance between cells, remembering to account for boundary
  * conditions. */
 __attribute__((always_inline)) INLINE static double cell_min_dist(
-    const struct cell *restrict ci, const struct cell *restrict cj, const double *dim) {
+    const struct cell *restrict ci, const struct cell *restrict cj, const double dim[3]) {
 
   /* Get cell locations. */
   const double cix_min = ci->loc[0];
@@ -376,7 +376,7 @@ __attribute__((always_inline)) INLINE static int is_local(const size_t group_id,
 /* Recurse on a pair of cells and perform a FOF search between cells that are within
  * range. */
 static void rec_fof_search_pair(struct cell *restrict ci, struct cell *restrict cj, struct space *s,
-                           const double *dim,
+                           const double dim[3],
                            const double search_r2) {
 
   /* Find the shortest distance between cells, remembering to account for
@@ -458,7 +458,7 @@ static void rec_fof_search_pair_foreign(struct cell *ci, struct cell *cj, struct
 /* Recurse on a cell and perform a FOF search between cells that are within
  * range. */
 static void rec_fof_search_self(struct cell *c, struct space *s,
-                           const double *dim,
+                           const double dim[3],
                            const double search_r2) {
 
   const double l_x2 = s->l_x2;
-- 
GitLab