From a15ce3e78ff9e55064a7f39db49375a952d3d76d Mon Sep 17 00:00:00 2001
From: Pedro Gonnet <gonnet@google.com>
Date: Tue, 25 Jul 2017 16:08:40 +0200
Subject: [PATCH] we only need ti_sorted in debug mode.

---
 src/cell.h   | 6 +++---
 src/runner.c | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/cell.h b/src/cell.h
index 93a59545bb..ef887d10e6 100644
--- a/src/cell.h
+++ b/src/cell.h
@@ -239,9 +239,6 @@ struct cell {
   /*! Maximum beginning of (integer) time step in this cell. */
   integertime_t ti_beg_max;
 
-  /*! Last (integer) time the cell's sort arrays were updated. */
-  integertime_t ti_sort;
-
   /*! Last (integer) time the cell's part were drifted forward in time. */
   integertime_t ti_old_part;
 
@@ -347,6 +344,9 @@ struct cell {
   char do_sub_sort;
 
 #ifdef SWIFT_DEBUG_CHECKS
+  /*! Last (integer) time the cell's sort arrays were updated. */
+  integertime_t ti_sort;
+
   /*! The list of tasks that have been executed on this cell */
   char tasks_executed[64];
 
diff --git a/src/runner.c b/src/runner.c
index 5af652d8a7..04d230209a 100644
--- a/src/runner.c
+++ b/src/runner.c
@@ -355,11 +355,11 @@ void runner_do_sort(struct runner *r, struct cell *c, int flags, int cleanup,
        finger = finger->parent) {
     if (finger->sorted & ~c->sorted) error("Inconsistent sort flags (upward).");
   }
-#endif
 
   /* Update the sort timer which represents the last time the sorts
      were re-set. */
   if (c->sorted == 0) c->ti_sort = r->e->ti_current;
+#endif
 
   /* start by allocating the entry arrays. */
   if (c->sort == NULL) {
-- 
GitLab