Mercurial > octave
comparison liboctave/array/idx-vector.h @ 23015:198fbbf6934a
new idx_vector (F77_INT) constructor
* idx-vector.h (idx_vector (octave_f77_int_type)): New constructor if
sizeof F77_INT and octave_idx_type differ.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Sat, 07 Jan 2017 13:19:46 -0500 |
parents | 27e4ec3b0b49 |
children | ef4d915df748 |
comparison
equal
deleted
inserted
replaced
23014:7a9313d27cea | 23015:198fbbf6934a |
---|---|
460 idx_vector (void) : rep (nil_rep ()) { rep->count++; } | 460 idx_vector (void) : rep (nil_rep ()) { rep->count++; } |
461 | 461 |
462 // Zero-based constructors (for use from C++). | 462 // Zero-based constructors (for use from C++). |
463 idx_vector (octave_idx_type i) : rep (new idx_scalar_rep (i)) | 463 idx_vector (octave_idx_type i) : rep (new idx_scalar_rep (i)) |
464 { chkerr (); } | 464 { chkerr (); } |
465 | |
466 #if OCTAVE_SIZEOF_F77_INT_TYPE != OCTAVE_SIZEOF_IDX_TYPE | |
467 idx_vector (octave_f77_int_type i) | |
468 : rep (new idx_scalar_rep (static_cast<octave_idx_type> (i))) | |
469 { chkerr (); } | |
470 #endif | |
465 | 471 |
466 idx_vector (octave_idx_type start, octave_idx_type limit, | 472 idx_vector (octave_idx_type start, octave_idx_type limit, |
467 octave_idx_type step = 1) | 473 octave_idx_type step = 1) |
468 : rep (new idx_range_rep (start, limit, step)) | 474 : rep (new idx_range_rep (start, limit, step)) |
469 { chkerr (); } | 475 { chkerr (); } |