From 72488ab88ce5f43d99164678a50d5b0dc6fd09ee Mon Sep 17 00:00:00 2001 From: Chris Danford Date: Wed, 9 Feb 2005 05:14:47 +0000 Subject: [PATCH] add debug assert --- stepmania/src/SubscriptionManager.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/stepmania/src/SubscriptionManager.h b/stepmania/src/SubscriptionManager.h index b6b0127502..f5ef6fd6a7 100644 --- a/stepmania/src/SubscriptionManager.h +++ b/stepmania/src/SubscriptionManager.h @@ -19,6 +19,10 @@ public: { if( s_pSubscribers == NULL ) s_pSubscribers = new set; +#if _DEBUG + typename set::iterator iter = s_pSubscribers->find( p ); + ASSERT_M( iter == s_pSubscribers->end(), "already subscribed" ); +#endif s_pSubscribers->insert( p ); }