From b4f281d209e77eb3f3e89a5ca32956a7a3072fc7 Mon Sep 17 00:00:00 2001 From: Matthieu Schaller <schaller@strw.leidenuniv.nl> Date: Tue, 20 Nov 2018 17:14:26 +0100 Subject: [PATCH] Fixed a documentation problem that broke a debugging macro in the runner. --- src/runner.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/runner.c b/src/runner.c index 24a19f9f7e..6d48af0118 100644 --- a/src/runner.c +++ b/src/runner.c @@ -612,7 +612,6 @@ void runner_do_sort_ascending(struct entry *sort, int N) { } #ifdef SWIFT_DEBUG_CHECKS -#define RUNNER_CHECK_SORTS(TYPE) /** * @brief Recursively checks that the flags are consistent in a cell hierarchy. * @@ -621,14 +620,15 @@ void runner_do_sort_ascending(struct entry *sort, int N) { * @param c The #cell to check. * @param flags The sorting flags to check. */ -void runner_check_sorts_##TYPE(struct cell *c, int flags) { - - if (flags & ~c->TYPE.sorted) error("Inconsistent sort flags (downward)!"); - if (c->split) - for (int k = 0; k < 8; k++) - if (c->progeny[k] != NULL && c->progeny[k]->TYPE.count > 0) - runner_check_sorts_##TYPE(c->progeny[k], c->TYPE.sorted); -} +#define RUNNER_CHECK_SORTS(TYPE) \ + void runner_check_sorts_##TYPE(struct cell *c, int flags) { \ + \ + if (flags & ~c->TYPE.sorted) error("Inconsistent sort flags (downward)!"); \ + if (c->split) \ + for (int k = 0; k < 8; k++) \ + if (c->progeny[k] != NULL && c->progeny[k]->TYPE.count > 0) \ + runner_check_sorts_##TYPE(c->progeny[k], c->TYPE.sorted); \ + } #else #define RUNNER_CHECK_SORTS(TYPE) \ void runner_check_sorts_##TYPE(struct cell *c, int flags) { \ -- GitLab