aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/stable/list.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/stable/list.h b/src/stable/list.h
index 0afed96..4f9d4aa 100644
--- a/src/stable/list.h
+++ b/src/stable/list.h
@@ -869,6 +869,30 @@ namespace Bu
869 869
870 return *this; 870 return *this;
871 } 871 }
872
873 /**
874 * Erases the first item in the list, identical to pop, but better for
875 * lists that aren't built as stacks, since you know where it will be
876 * erasing from.
877 */
878 MyType &eraseFirst()
879 {
880 _hardCopy();
881 erase( begin() );
882
883 return *this;
884 }
885
886 /**
887 * Erases the last item in the list.
888 */
889 MyType &eraseLast()
890 {
891 _hardCopy();
892 core->erase( core->pLast );
893
894 return *this;
895 }
872 896
873 iterator find( const value &v ) 897 iterator find( const value &v )
874 { 898 {