X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;ds=sidebyside;f=source%2Ftag.cpp;h=c5824aec4e114d60b04c53acd00ae2b54072f7fe;hb=HEAD;hp=af92bbb8b60780cb0827a63e8d0ea3c6795299d6;hpb=f14435e58bfa0fa697a06ba9a454bb30cd37d9d8;p=libs%2Fgl.git diff --git a/source/tag.cpp b/source/tag.cpp deleted file mode 100644 index af92bbb8..00000000 --- a/source/tag.cpp +++ /dev/null @@ -1,28 +0,0 @@ -#include "tag.h" - -namespace { - -template -inline unsigned hash(T begin, T end) -{ - unsigned result = 0; - for(T i=begin; (i!=end && *i); ++i) - result = ((result>>29)|(result<<5))^static_cast(*i); - return result; -} - -} - -namespace Msp { -namespace GL { - -Tag::Tag(const char *s): - id(s ? hash(s, 0) : 0) -{ } - -Tag::Tag(const std::string &s): - id(hash(s.begin(), s.end())) -{ } - -} // namespace GL -} // namespace Msp