# HG changeset patch # User jwe # Date 1077038197 0 # Node ID 55975a3073be116947be0136c1bad36c1aa7b30e # Parent 3dfdf6f36854c3713e5f33796f1d32a849c5ec66 [project @ 2004-02-17 17:16:37 by jwe] diff -r 3dfdf6f36854 -r 55975a3073be liboctave/oct-fftw.cc --- a/liboctave/oct-fftw.cc Tue Feb 17 16:23:22 2004 +0000 +++ b/liboctave/oct-fftw.cc Tue Feb 17 17:16:37 2004 +0000 @@ -109,12 +109,12 @@ int which = (dir == FFTW_FORWARD) ? 0 : 1; fftw_plan *cur_plan_p = &plan[which]; bool create_new_plan = false; - char in_align = (X_CAST (int, in)) & 0xF; - char out_align = (X_CAST (int, out)) & 0xF; + char in_align = (reinterpret_cast (in)) & 0xF; + char out_align = (reinterpret_cast (out)) & 0xF; - if (plan[which] == 0 || d[which] != dist || s[which] != stride || - r[which] != rank || h[which] != howmany || - ialign[which] != in_align || oalign[which] != out_align) + if (plan[which] == 0 || d[which] != dist || s[which] != stride + || r[which] != rank || h[which] != howmany + || ialign[which] != in_align || oalign[which] != out_align) create_new_plan = true; else // We still might not have the same shape of array @@ -163,12 +163,11 @@ { fftw_plan *cur_plan_p = &rplan; bool create_new_plan = false; - char in_align = (X_CAST (int, in)) & 0xF; - char out_align = (X_CAST (int, out)) & 0xF; + char in_align = (reinterpret_cast (in)) & 0xF; + char out_align = (reinterpret_cast (out)) & 0xF; - if (rplan == 0 || rd != dist || rs != stride || - rr != rank || rh != howmany || - rialign != in_align || roalign != out_align) + if (rplan == 0 || rd != dist || rs != stride || rr != rank + || rh != howmany || rialign != in_align || roalign != out_align) create_new_plan = true; else // We still might not have the same shape of array diff -r 3dfdf6f36854 -r 55975a3073be src/utils.cc --- a/src/utils.cc Tue Feb 17 16:23:22 2004 +0000 +++ b/src/utils.cc Tue Feb 17 17:16:37 2004 +0000 @@ -810,7 +810,7 @@ int n = v.length (); dim.resize (n); for (int i = 0; i < n; i++) - dim(i) = fix (v(i)); + dim(i) = static_cast (fix (v(i))); } else warning ("%s (A): use %s (size (A)) instead", warn_for, warn_for); @@ -840,8 +840,8 @@ if (error_state) return; - nr = fix (v (0)); - nc = fix (v (1)); + nr = static_cast (fix (v (0))); + nc = static_cast (fix (v (1))); } else warning ("%s (A): use %s (size (A)) instead", warn_for, warn_for); @@ -1072,10 +1072,10 @@ double t; unsigned int usec - = static_cast (modf (seconds, &t) * 1000000); + = static_cast (modf (seconds, &t) * 1000000); unsigned int sec - = (t > UINT_MAX) ? UINT_MAX : static_cast (t); + = (t > UINT_MAX) ? UINT_MAX : static_cast (t); octave_sleep (sec); octave_usleep (usec);