From 2c1bfa4da2ae809b6580ed1d6cd420cdba2806d0 Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Wed, 9 Sep 2009 23:30:44 +0000 Subject: Fixed a unit test, and added some fixes and new queue functions to list, fuck it it's easier when they're in list. --- src/list.h | 21 +++++++++++++++++++++ src/unit/fstring.unit | 2 +- 2 files changed, 22 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/list.h b/src/list.h index 12b50e5..cce29fe 100644 --- a/src/list.h +++ b/src/list.h @@ -263,6 +263,27 @@ namespace Bu return v; } + MyType &push( const value &v ) + { + _hardCopy(); + prepend( v ); + + return *this; + } + + MyType &pop() + { + _hardCopy(); + erase( begin() ); + + return *this; + } + + value &peek() + { + return first(); + } + /** * Append a value to the list. *@param v (const value_type &) The value to append. diff --git a/src/unit/fstring.unit b/src/unit/fstring.unit index 40b1ce2..53ae780 100644 --- a/src/unit/fstring.unit +++ b/src/unit/fstring.unit @@ -35,7 +35,7 @@ unitTest( strcmp( b.getStr(), "abcdef" ) == 0 ); } -{%shared1:fail} +{%shared1} { Bu::FString a("Hey there"); Bu::FString b( a ); -- cgit v1.2.3