From ffc3726120bcc38a5495f248f040b571a650f4ea Mon Sep 17 00:00:00 2001 From: tradke Date: Mon, 10 Mar 2003 11:07:15 +0000 Subject: 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 --- src/WriteInfo.c | 14 ++------------ 1 file 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) -- cgit v1.2.3