X-Git-Url: http://git.tdb.fi/?p=libs%2Fgl.git;a=blobdiff_plain;f=source%2Ftag.h;h=28b4fa010e8b0f12980df476f7ac8160a2c922fb;hp=87d4af656d9a8cea87969f7c966ac6d74d7fb26e;hb=e1e69c49b7727223a43cdc2deac4f1c03a3e3aba;hpb=c6aea1bc1586ffef132e6fffdf99343cb56617db diff --git a/source/tag.h b/source/tag.h index 87d4af65..28b4fa01 100644 --- a/source/tag.h +++ b/source/tag.h @@ -6,6 +6,10 @@ 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; @@ -13,6 +17,9 @@ struct Tag Tag(): id(0) { } Tag(const char *); Tag(const std::string &s); + + bool operator<(const Tag &t) const { return id