diff --git a/src/basic/vx_util/num_array.h b/src/basic/vx_util/num_array.h index 6103b4b9f4..0d78337927 100644 --- a/src/basic/vx_util/num_array.h +++ b/src/basic/vx_util/num_array.h @@ -57,7 +57,7 @@ class NumArray { double operator[](int) const; - const double * vals() const; + const std::vector & vals() const; double * buf(); int has(int, bool forward=true) const; @@ -128,8 +128,9 @@ class NumArray { inline int NumArray::n_elements() const { return ( e.size() ); } -inline int NumArray::n () const { return ( e.size() ); } -inline const double * NumArray::vals() const { return ( e.data() ); } +inline int NumArray::n() const { return ( e.size() ); } +inline const std::vector & + NumArray::vals() const { return ( e ); } inline double * NumArray::buf() { return ( e.data() ); } inline void NumArray::inc(int i, int v) { e[i] += v; return; } inline void NumArray::inc(int i, double v) { e[i] += v; return; }