# HG changeset patch # User Jaroslav Hajek # Date 1233840870 -3600 # Node ID a2bcd96b9344365d3d8b1b45a996adcbc6873356 # Parent 280fae940bb0ea1e6a03c0f73f13a046494a915e use allocators for idx_vector_rep subclasses diff -r 280fae940bb0 -r a2bcd96b9344 liboctave/idx-vector.cc --- a/liboctave/idx-vector.cc Thu Feb 05 13:58:11 2009 +0100 +++ b/liboctave/idx-vector.cc Thu Feb 05 14:34:30 2009 +0100 @@ -60,6 +60,8 @@ ("internal error: idx_vector index out of range."); } +DEFINE_OCTAVE_ALLOCATOR(idx_vector::idx_colon_rep); + idx_vector::idx_colon_rep::idx_colon_rep (char c) { if (c != ':') @@ -88,6 +90,8 @@ return os << ":"; } +DEFINE_OCTAVE_ALLOCATOR(idx_vector::idx_range_rep); + idx_vector::idx_range_rep::idx_range_rep (octave_idx_type _start, octave_idx_type _limit, octave_idx_type _step) : start(_start), len (_step ? (_limit - _start) / _step : -1), step (_step) @@ -209,6 +213,8 @@ return convert_index (i, conv_error, ext); } +DEFINE_OCTAVE_ALLOCATOR(idx_vector::idx_scalar_rep); + template idx_vector::idx_scalar_rep::idx_scalar_rep (T x) { @@ -239,6 +245,8 @@ return os << data; } +DEFINE_OCTAVE_ALLOCATOR(idx_vector::idx_vector_rep); + template idx_vector::idx_vector_rep::idx_vector_rep (const Array& nda) : data (0), len (nda.numel ()), ext (0), aowner (0), orig_dims (nda.dims ()) diff -r 280fae940bb0 -r a2bcd96b9344 liboctave/idx-vector.h --- a/liboctave/idx-vector.h Thu Feb 05 13:58:11 2009 +0100 +++ b/liboctave/idx-vector.h Thu Feb 05 14:34:30 2009 +0100 @@ -31,6 +31,7 @@ #include "dim-vector.h" #include "oct-inttypes.h" +#include "oct-alloc.h" template class Array; template class Sparse; @@ -137,6 +138,8 @@ private: + DECLARE_OCTAVE_ALLOCATOR + // No copying! idx_colon_rep (const idx_colon_rep& idx); }; @@ -190,6 +193,8 @@ private: + DECLARE_OCTAVE_ALLOCATOR + // No copying! idx_range_rep (const idx_range_rep& idx); @@ -241,6 +246,8 @@ private: + DECLARE_OCTAVE_ALLOCATOR + // No copying! idx_scalar_rep (const idx_scalar_rep& idx); @@ -299,6 +306,8 @@ private: + DECLARE_OCTAVE_ALLOCATOR + // No copying! idx_vector_rep (const idx_vector_rep& idx);