operator< for use in maps

This commit is contained in:
Glenn Maynard
2005-12-28 20:53:42 +00:00
parent 70d67b6e5e
commit 87dc61af3e
+8
View File
@@ -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 );