Mercurial > hg > octave-nkf
diff src/ov-re-mat.cc @ 5760:8d7162924bd3
[project @ 2006-04-14 04:01:37 by jwe]
author | jwe |
---|---|
date | Fri, 14 Apr 2006 04:01:40 +0000 |
parents | ce79d238f142 |
children | ace8d8d26933 |
line wrap: on
line diff
--- a/src/ov-re-mat.cc +++ b/src/ov-re-mat.cc @@ -433,11 +433,11 @@ // Use negative value for ndims to differentiate with old format!! FOUR_BYTE_INT tmp = - d.length(); - os.write (X_CAST (char *, &tmp), 4); + os.write (reinterpret_cast<char *> (&tmp), 4); for (int i = 0; i < d.length (); i++) { tmp = d(i); - os.write (X_CAST (char *, &tmp), 4); + os.write (reinterpret_cast<char *> (&tmp), 4); } NDArray m = array_value (); @@ -471,7 +471,7 @@ { char tmp; FOUR_BYTE_INT mdims; - if (! is.read (X_CAST (char *, &mdims), 4)) + if (! is.read (reinterpret_cast<char *> (&mdims), 4)) return false; if (swap) swap_bytes<4> (&mdims); @@ -484,7 +484,7 @@ for (int i = 0; i < mdims; i++) { - if (! is.read (X_CAST (char *, &di), 4)) + if (! is.read (reinterpret_cast<char *> (&di), 4)) return false; if (swap) swap_bytes<4> (&di); @@ -503,12 +503,12 @@ dv(0) = 1; } - if (! is.read (X_CAST (char *, &tmp), 1)) + if (! is.read (reinterpret_cast<char *> (&tmp), 1)) return false; NDArray m(dv); double *re = m.fortran_vec (); - read_doubles (is, re, X_CAST (save_type, tmp), dv.numel (), swap, fmt); + read_doubles (is, re, static_cast<save_type> (tmp), dv.numel (), swap, fmt); if (error_state || ! is) return false; matrix = m; @@ -517,16 +517,16 @@ { FOUR_BYTE_INT nr, nc; nr = mdims; - if (! is.read (X_CAST (char *, &nc), 4)) + if (! is.read (reinterpret_cast<char *> (&nc), 4)) return false; if (swap) swap_bytes<4> (&nc); - if (! is.read (X_CAST (char *, &tmp), 1)) + if (! is.read (reinterpret_cast<char *> (&tmp), 1)) return false; Matrix m (nr, nc); double *re = m.fortran_vec (); octave_idx_type len = nr * nc; - read_doubles (is, re, X_CAST (save_type, tmp), len, swap, fmt); + read_doubles (is, re, static_cast<save_type> (tmp), len, swap, fmt); if (error_state || ! is) return false; matrix = m;