# HG changeset patch # User John W. Eaton # Date 1231804943 18000 # Node ID 5da39b223f61e5a555e85b625aff822b84ba59ed # Parent 830a03b5f1654fd29fe41cd5886e06378e8e43fe base-list.h (push_front, pop_front, push_back, pop_back): new functions. diff --git a/src/ChangeLog b/src/ChangeLog --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,9 @@ 2009-01-12 John W. Eaton + * base-list.h (octave_base_list::push_front, + octave_base_list::push_back, octave_base_list::pop_front, + octave_base_list::pop_back): New functions. + * DLD-FUNCTIONS/qr.cc (Fqrupdate, Fqrinsert, Fqrdelete, Fqrshift): Require args to be numeric, not necessarily matrix objects. diff --git a/src/base-list.h b/src/base-list.h --- a/src/base-list.h +++ b/src/base-list.h @@ -65,8 +65,6 @@ void clear (void) { lst.clear (); } - void append (const elt_type& s) { lst.push_back (s); } - iterator begin (void) { return iterator (lst.begin ()); } const_iterator begin (void) const { return const_iterator (lst.begin ()); } @@ -79,6 +77,15 @@ const elt_type& front (void) const { return lst.front (); } const elt_type& back (void) const { return lst.back (); } + void push_front (const elt_type& s) { lst.push_front (s); } + void push_back (const elt_type& s) { lst.push_back (s); } + + void pop_front (void) { lst.pop_front (); } + void pop_back (void) { lst.pop_back (); } + + // For backward compatibility. + void append (const elt_type& s) { lst.push_back (s); } + private: std::list lst;