diff options
-rw-r--r-- | src/WriteInfo.c | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/src/WriteInfo.c b/src/WriteInfo.c index 850d088..2355074 100644 --- a/src/WriteInfo.c +++ b/src/WriteInfo.c @@ -61,18 +61,9 @@ int IOBasic_WriteInfo (const cGH *GH, int vindex) iobasicGH *myGH; void *ptr; iobasic_reduction_t *reduction; - /*** FIXME: can CCTK_Reduce() have a 'const cGH *' parameter ?? ***/ - union - { - const cGH *const_ptr; - cGH *non_const_ptr; - } GH_fake_const; - - - GH_fake_const.const_ptr = GH; - myGH = (iobasicGH *) CCTK_GHExtension (GH, "IOBasic"); + myGH = CCTK_GHExtension (GH, "IOBasic"); reduction = myGH->info_reductions[vindex].reductions; /* first, check if variable has storage assigned */ @@ -184,8 +175,7 @@ int IOBasic_WriteInfo (const cGH *GH, int vindex) /* for CCTK_GF and CCTK_ARRAY variables: loop over all reductions */ while (reduction) { - reduction->is_valid = CCTK_Reduce (GH_fake_const.non_const_ptr, -1, - reduction->handle, 1, + reduction->is_valid = CCTK_Reduce (GH, -1, reduction->handle, 1, CCTK_VARIABLE_REAL, &reduction->value, 1, vindex) == 0; if (! reduction->is_valid) |