diff options
author | tradke <tradke@b589c3ab-70e8-4b4d-a09f-cba2dd200880> | 2003-03-10 11:07:15 +0000 |
---|---|---|
committer | tradke <tradke@b589c3ab-70e8-4b4d-a09f-cba2dd200880> | 2003-03-10 11:07:15 +0000 |
commit | ffc3726120bcc38a5495f248f040b571a650f4ea (patch) | |
tree | 4d835eabc320bf45972c5b7a6803334a83f2c5a5 | |
parent | fb1f347cd6f52f0cbbea04971680ee146fb3079a (diff) |
Removed an ugly artefact where a union was used to convert a 'const cGH*'
pointer into 'cGH *' which was required by the old flesh's reduction API.
This API has been fixed now. You need to update the flesh for this.
git-svn-id: http://svn.cactuscode.org/arrangements/CactusBase/IOBasic/trunk@140 b589c3ab-70e8-4b4d-a09f-cba2dd200880
-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) |