From a393c6d28f18f1f528186c53707f2b6f53756fba Mon Sep 17 00:00:00 2001 From: tradke Date: Mon, 10 Mar 2003 11:08:25 +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/CactusIO/IOJpeg/trunk@82 eff87b29-5268-4891-90a3-a07138403961 --- src/Write.c | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/src/Write.c b/src/Write.c index c642b56..d23e3ee 100644 --- a/src/Write.c +++ b/src/Write.c @@ -80,12 +80,6 @@ int IOJpeg_Write (const cGH *GH, CCTK_INT vindex, const char *alias) void *hdata; CCTK_REAL min, max; const CCTK_INT htype = CCTK_VARIABLE_REAL; - /*** FIXME: can CCTK_Reduce() have a 'const cGH *' parameter ?? ***/ - union - { - const cGH *const_ptr; - cGH *non_const_ptr; - } GH_fake_const; DECLARE_CCTK_PARAMETERS @@ -115,13 +109,10 @@ int IOJpeg_Write (const cGH *GH, CCTK_INT vindex, const char *alias) } else { - GH_fake_const.const_ptr = GH; i = CCTK_ReductionHandle ("minimum"); - CCTK_Reduce (GH_fake_const.non_const_ptr, 0, i, 1, CCTK_VARIABLE_REAL, - &min, 1, vindex); + CCTK_Reduce (GH, 0, i, 1, CCTK_VARIABLE_REAL, &min, 1, vindex); i = CCTK_ReductionHandle ("maximum"); - CCTK_Reduce (GH_fake_const.non_const_ptr, 0, i, 1, CCTK_VARIABLE_REAL, - &max, 1, vindex); + CCTK_Reduce (GH, 0, i, 1, CCTK_VARIABLE_REAL, &max, 1, vindex); } /* get the number of slices to output */ -- cgit v1.2.3