Mercurial > hg > octave-nkf
diff src/oct-stream.cc @ 2800:9aeba8e006a4
[project @ 1997-03-09 09:50:20 by jwe]
author | jwe |
---|---|
date | Sun, 09 Mar 1997 09:50:39 +0000 |
parents | 99dd10f4eaaf |
children | 8b262e771614 |
line wrap: on
line diff
--- a/src/oct-stream.cc +++ b/src/oct-stream.cc @@ -62,7 +62,7 @@ { int ival = NINT (dval); - if ((double) ival == dval) + if (ival == dval) retval = ival; else conv_err = 4; @@ -1260,7 +1260,7 @@ if (is.scan (fmt, &tmp)) { if (! discard) - retval = (double) tmp; + retval = static_cast<double> (tmp); } else quit = true; @@ -1547,7 +1547,10 @@ string string_value (void); operator void* () const - { return (curr_state == ok) ? (void *) -1 : (void *) 0; } + { + return (curr_state == ok) + ? static_cast<void *> (-1) : static_cast<void *> (0); + } bool no_more_values (void) { return curr_state == list_exhausted; } @@ -1814,10 +1817,12 @@ { if (elt->modifier == 'l') do_printf_conv (os, fmt, nsa, sa_1, - sa_2, true, (long) val); + sa_2, true, + static_cast<long> (val)); else do_printf_conv (os, fmt, nsa, sa_1, - sa_2, true, (int) val); + sa_2, true, + static_cast<int> (val)); } break;