]> git.tdb.fi Git - libs/gl.git/blobdiff - source/tag.h
Fix matrix interpolation parameter calculation
[libs/gl.git] / source / tag.h
index b2d4fd512b9a10c4c777950eda43ed8943005b9e..28b4fa010e8b0f12980df476f7ac8160a2c922fb 100644 (file)
@@ -1,10 +1,3 @@
-/* $Id$
-
-This file is part of libmspgl
-Copyright © 2007  Mikko Rasa, Mikkosoft Productions
-Distributed under the LGPL
-*/
-
 #ifndef MSP_GL_TAG_H_
 #define MSP_GL_TAG_H_
 
@@ -13,6 +6,10 @@ Distributed under the LGPL
 namespace Msp {
 namespace GL {
 
+/**
+Provides transparent string-to-hash conversion for faster comparison.  An empty
+string is guaranteed to have an id of 0.
+*/
 struct Tag
 {
        unsigned id;
@@ -20,6 +17,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