]> 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 87d4af656d9a8cea87969f7c966ac6d74d7fb26e..47c4643e1fa8e27fd5fe73fe96c84ce78650d938 100644 (file)
@@ -1,3 +1,10 @@
+/* $Id$
+
+This file is part of libmspgl
+Copyright © 2007, 2010  Mikko Rasa, Mikkosoft Productions
+Distributed under the LGPL
+*/
+
 #ifndef MSP_GL_TAG_H_
 #define MSP_GL_TAG_H_
 
@@ -13,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