From 8642fe0ba100dee5a66265b07e21e043887a4a92 Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Fri, 21 Dec 2012 00:06:20 +0000 Subject: Signals (slots really) are now comperable. Building two slots for the same function or same object and method will compare as expected. Also added a -= function to Bu::List which works just like erase. --- src/stable/archive.h | 2 +- src/stable/list.h | 5 +++++ src/tests/signal.cpp | 2 ++ 3 files changed, 8 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/stable/archive.h b/src/stable/archive.h index f98402d..5c3a055 100644 --- a/src/stable/archive.h +++ b/src/stable/archive.h @@ -129,7 +129,7 @@ namespace Bu private: Stream &rStream; uint32_t nNextID; - Hash hPtrID; + Hash hPtrID; Hash > hPtrDest; Hash hProps; }; diff --git a/src/stable/list.h b/src/stable/list.h index b7fb1d1..0b6329c 100644 --- a/src/stable/list.h +++ b/src/stable/list.h @@ -250,6 +250,11 @@ namespace Bu return *this; } + MyType &operator-=( const value &v ) + { + return erase( v ); + } + MyType &operator+=( const MyType &src ) { _hardCopy(); diff --git a/src/tests/signal.cpp b/src/tests/signal.cpp index 93519fa..62e8bd5 100644 --- a/src/tests/signal.cpp +++ b/src/tests/signal.cpp @@ -40,6 +40,8 @@ int main() lMaths += slot(Double); lMaths += slot(Square); println("Math'd %1 = %2").arg( 5 ).arg( lMaths(5) ); + lMaths -= slot(Square); + println("Math'd %1 = %2").arg( 5 ).arg( lMaths(5) ); return 0; } -- cgit v1.2.3