3 This file is part of libmspgl
4 Copyright © 2007, 2010 Mikko Rasa, Mikkosoft Productions
5 Distributed under the LGPL
13 inline unsigned hash(T begin, T end)
16 for(T i=begin; (i!=end && *i); ++i)
17 result=((result>>29)|(result<<5))^static_cast<unsigned char>(*i);
26 Tag::Tag(const char *s):
27 id(s ? hash<const char *>(s, 0) : 0)
30 Tag::Tag(const std::string &s):
31 id(hash(s.begin(), s.end()))