diff liboctave/idx-vector.cc @ 8680:a2bcd96b9344

use allocators for idx_vector_rep subclasses
author Jaroslav Hajek <highegg@gmail.com>
date Thu, 05 Feb 2009 14:34:30 +0100
parents 095ae5e0a831
children eb63fbe60fab
line wrap: on
line diff
--- 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 <class T>
 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 <class T>
 idx_vector::idx_vector_rep::idx_vector_rep (const Array<T>& nda)
   : data (0), len (nda.numel ()), ext (0), aowner (0), orig_dims (nda.dims ())