# HG changeset patch # User jwe # Date 1196442596 0 # Node ID 64d6f4dc37e0e98be981d05c541dcfd47c0cd050 # Parent 685c186d8f62f8471334c6c2396fb8b155bfcec1 [project @ 2007-11-30 17:09:55 by jwe] diff -r 685c186d8f62 -r 64d6f4dc37e0 src/ChangeLog --- a/src/ChangeLog Fri Nov 30 16:43:13 2007 +0000 +++ b/src/ChangeLog Fri Nov 30 17:09:56 2007 +0000 @@ -6,6 +6,8 @@ * OPERATORS/op-sbm-sbm.cc (DEFDBLCONVFN): Delete useless macro invocation. + * DLD-FUNCTIONS/typecast.cc (typecast): No longer static. + 2007-11-30 John W. Eaton * graphics.cc (updating_axis_limits): New static variable. diff -r 685c186d8f62 -r 64d6f4dc37e0 src/DLD-FUNCTIONS/typecast.cc --- a/src/DLD-FUNCTIONS/typecast.cc Fri Nov 30 16:43:13 2007 +0000 +++ b/src/DLD-FUNCTIONS/typecast.cc Fri Nov 30 17:09:56 2007 +0000 @@ -30,7 +30,7 @@ #include "oct.h" template -static void +/* static */ void typecast (const Array& x, Array& y) { octave_idx_type n = x.length (); @@ -38,7 +38,7 @@ size_t ms = sizeof (LT); if (n * ns % ms != 0) - error ("typecast: incorrect number of input values to make output value"); + error ("typecast: incorrect number of input values to make output value"); else { octave_idx_type m = n * ns / ms; @@ -50,8 +50,8 @@ break; } y.resize (dv); - const unsigned char *xp = reinterpret_cast - (x.fortran_vec ()); + const unsigned char *xp + = reinterpret_cast (x.fortran_vec ()); unsigned char *yp = reinterpret_cast(y.fortran_vec ()); for (octave_idx_type i = 0; i < n * static_cast(ns); i++) @@ -157,11 +157,11 @@ if (type == "single") error ("typecast: type 'single' is not supported"); - else if (type != "uint8" && type != "uint16" && - type != "uint32" && type != "uint64" && - type != "int8" && type != "int16" && - type != "int32" && type != "int64" && - type != "single" && type != "double") + else if (type != "uint8" && type != "uint16" + && type != "uint32" && type != "uint64" + && type != "int8" && type != "int16" + && type != "int32" && type != "int64" + && type != "single" && type != "double") error ("typecast: unrecognized or invalid type"); else if (args(0).is_sparse_type () || args(0).is_complex_type ()) error ("typecast: sparse and complex types are invalid");