X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Frender%2Ftag.cpp;fp=source%2Frender%2Ftag.cpp;h=0000000000000000000000000000000000000000;hb=fa2b4c8a93ebad2497cacfdeaa9a2c20be486520;hp=b5f860334e8a3792b7d8f4fe88f47e2dcd9a4e31;hpb=20622e74de6753c5e4460a112c11ee913707e8e8;p=libs%2Fgl.git diff --git a/source/render/tag.cpp b/source/render/tag.cpp deleted file mode 100644 index b5f86033..00000000 --- a/source/render/tag.cpp +++ /dev/null @@ -1,54 +0,0 @@ -#include -#include -#include -#include -#include "tag.h" - -using namespace std; - -namespace { - -#ifdef DEBUG -map tag_names; -#endif - -} - -namespace Msp { -namespace GL { - -Tag::Tag(const char *s): - id((s && *s) ? hash32(s, strlen(s)) : 0) -{ -#ifdef DEBUG - if(s) - tag_names.insert(make_pair(*this, string(s))); -#endif -} - -Tag::Tag(const std::string &s): - id(s.empty() ? 0 : hash32(s)) -{ -#ifdef DEBUG - if(!s.empty()) - tag_names.insert(make_pair(*this, s)); -#endif -} - -string Tag::str() const -{ -#ifdef DEBUG - map::const_iterator i=tag_names.find(*this); - if(i!=tag_names.end()) - return i->second; -#endif - return format("Tag(%d)", id); -} - -void operator<<(LexicalConverter &conv, Tag tag) -{ - conv.result(tag.str()); -} - -} // namespace GL -} // namespace Msp