Mercurial > hg > octave-nkf
changeset 4783:55975a3073be
[project @ 2004-02-17 17:16:37 by jwe]
author | jwe |
---|---|
date | Tue, 17 Feb 2004 17:16:37 +0000 |
parents | 3dfdf6f36854 |
children | 743ef6154f8a |
files | liboctave/oct-fftw.cc src/utils.cc |
diffstat | 2 files changed, 14 insertions(+), 15 deletions(-) [+] |
line wrap: on
line diff
--- a/liboctave/oct-fftw.cc +++ b/liboctave/oct-fftw.cc @@ -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<long> (in)) & 0xF; + char out_align = (reinterpret_cast<long> (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<long> (in)) & 0xF; + char out_align = (reinterpret_cast<long> (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
--- a/src/utils.cc +++ b/src/utils.cc @@ -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<int> (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<int> (fix (v (0))); + nc = static_cast<int> (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 <unsigned int> (modf (seconds, &t) * 1000000); + = static_cast<unsigned int> (modf (seconds, &t) * 1000000); unsigned int sec - = (t > UINT_MAX) ? UINT_MAX : static_cast <unsigned int> (t); + = (t > UINT_MAX) ? UINT_MAX : static_cast<unsigned int> (t); octave_sleep (sec); octave_usleep (usec);