Changeset 835
- Timestamp:
- 02/23/10 15:24:54 (15 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
library/bdm/base/itpp/base/array.h
r813 r835 163 163 164 164 //! Shift in data at position 0. Return data from the last position. 165 T shift_right(const T& e);165 T& shift_right(const T& e); 166 166 //! Shift in array at position 0. Return data from the last position. 167 167 const Array<T> shift_right(const Array<T> &a); 168 168 //! Shift in data at the last position. Return data from position 0. 169 T shift_left(const T& e);169 T& shift_left(const T& e); 170 170 //! Shift in array at the last position. Return data from position 0. 171 171 const Array<T> shift_left(const Array<T> &a); … … 387 387 388 388 template<class T> 389 T Array<T>::shift_right(const T& x)389 T& Array<T>::shift_right(const T& x) 390 390 { 391 391 it_assert_debug(ndata > 0, "Array::shift_right(x): Array empty!"); … … 397 397 data[0] = x; 398 398 399 return ret; 399 //return ret; 400 return data[0]; 400 401 } 401 402 … … 418 419 419 420 template<class T> 420 T Array<T>::shift_left(const T& x)421 T& Array<T>::shift_left(const T& x) 421 422 { 422 423 T temp = data[0]; … … 426 427 data[ndata-1] = x; 427 428 428 return temp; 429 //return temp; 430 return data[0]; 429 431 } 430 432