From b9de4e9965bf8a2281e1fbb379d28e1bd3ef901d Mon Sep 17 00:00:00 2001 From: Steve Checkoway Date: Mon, 24 Jul 2006 05:58:11 +0000 Subject: [PATCH] Specialize std::swap() for NoteData in terms of NoteData::swap() so that swap( a, b ) takes constant time. --- stepmania/src/NoteData.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/stepmania/src/NoteData.h b/stepmania/src/NoteData.h index 6436e87275..13f929b8da 100644 --- a/stepmania/src/NoteData.h +++ b/stepmania/src/NoteData.h @@ -257,6 +257,9 @@ public: void LoadFromNode( const XNode* pNode ); }; +namespace std { + template<> inline void swap( NoteData &nd1, NoteData &nd2 ) { nd1.swap( nd2 ); } +} #endif