aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortradke <tradke@eff87b29-5268-4891-90a3-a07138403961>2003-03-10 11:08:25 +0000
committertradke <tradke@eff87b29-5268-4891-90a3-a07138403961>2003-03-10 11:08:25 +0000
commita393c6d28f18f1f528186c53707f2b6f53756fba (patch)
treec187412cdf029787d40672d2d1a2bbf3b318b18d
parent051b475b521d5d11494bbf61d2b4d27e1a344528 (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/CactusIO/IOJpeg/trunk@82 eff87b29-5268-4891-90a3-a07138403961
-rw-r--r--src/Write.c13
1 files 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 */