comparison src/ov-perm.cc @ 9605:dfc68e6d8741

avoid some gcc warnings
author John W. Eaton <jwe@octave.org>
date Wed, 02 Sep 2009 13:11:06 -0400
parents 93f18f166aba
children f80c566bc751
comparison
equal deleted inserted replaced
9604:4dd8fc7c106c 9605:dfc68e6d8741
306 306
307 bool 307 bool
308 octave_perm_matrix::save_binary (std::ostream& os, bool&) 308 octave_perm_matrix::save_binary (std::ostream& os, bool&)
309 { 309 {
310 310
311 int32_t size = matrix.rows (); 311 int32_t sz = matrix.rows ();
312 bool colp = matrix.is_col_perm (); 312 bool colp = matrix.is_col_perm ();
313 os.write (reinterpret_cast<char *> (&size), 4); 313 os.write (reinterpret_cast<char *> (&sz), 4);
314 os.write (reinterpret_cast<char *> (&colp), 1); 314 os.write (reinterpret_cast<char *> (&colp), 1);
315 os.write (reinterpret_cast<const char *> (matrix.data ()), matrix.byte_size()); 315 os.write (reinterpret_cast<const char *> (matrix.data ()), matrix.byte_size ());
316 316
317 return true; 317 return true;
318 } 318 }
319 319
320 bool 320 bool
321 octave_perm_matrix::load_binary (std::istream& is, bool swap, 321 octave_perm_matrix::load_binary (std::istream& is, bool swap,
322 oct_mach_info::float_format ) 322 oct_mach_info::float_format )
323 { 323 {
324 int32_t size; 324 int32_t sz;
325 bool colp; 325 bool colp;
326 if (! (is.read (reinterpret_cast<char *> (&size), 4) 326 if (! (is.read (reinterpret_cast<char *> (&sz), 4)
327 && is.read (reinterpret_cast<char *> (&colp), 1))) 327 && is.read (reinterpret_cast<char *> (&colp), 1)))
328 return false; 328 return false;
329 329
330 MArray<octave_idx_type> m (size); 330 MArray<octave_idx_type> m (sz);
331 331
332 if (! is.read (reinterpret_cast<char *> (m.fortran_vec ()), m.byte_size ())) 332 if (! is.read (reinterpret_cast<char *> (m.fortran_vec ()), m.byte_size ()))
333 return false; 333 return false;
334 334
335 if (swap) 335 if (swap)