From 87dc61af3e95ea71ab825cbdd9f7604d3ed4b8f9 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Wed, 28 Dec 2005 20:53:42 +0000 Subject: [PATCH] operator< for use in maps --- stepmania/src/RageInputDevice.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/stepmania/src/RageInputDevice.h b/stepmania/src/RageInputDevice.h index 1867e5bd62..f8fa4399ce 100644 --- a/stepmania/src/RageInputDevice.h +++ b/stepmania/src/RageInputDevice.h @@ -285,6 +285,14 @@ public: { return ! operator==( other ); } + bool operator<( const DeviceInput &other ) const + { + /* Return true if we represent the same button on the same device. Don't + * compare level or ts. */ + if( device != other.device ) + return device < other.device; + return button < other.button; + }; CString ToString() const; bool FromString( const CString &s );