]> git.tdb.fi Git - libs/gl.git/blobdiff - source/tag.h
Make Tag directly comparable and use it as a key in relevant maps
[libs/gl.git] / source / tag.h
index b2d4fd512b9a10c4c777950eda43ed8943005b9e..47c4643e1fa8e27fd5fe73fe96c84ce78650d938 100644 (file)
@@ -1,7 +1,7 @@
 /* $Id$
 
 This file is part of libmspgl
-Copyright © 2007  Mikko Rasa, Mikkosoft Productions
+Copyright © 2007, 2010  Mikko Rasa, Mikkosoft Productions
 Distributed under the LGPL
 */
 
@@ -20,6 +20,9 @@ struct Tag
        Tag(): id(0) { }
        Tag(const char *);
        Tag(const std::string &s);
+
+       bool operator<(const Tag &t) const { return id<t.id; }
+       bool operator==(const Tag &t) const { return id==t.id; }
 };
 
 } // namespace GL