]> git.tdb.fi Git - libs/gl.git/blobdiff - source/render/tag.cpp
Rearrange soucre files into subdirectories
[libs/gl.git] / source / render / tag.cpp
diff --git a/source/render/tag.cpp b/source/render/tag.cpp
new file mode 100644 (file)
index 0000000..c5824ae
--- /dev/null
@@ -0,0 +1,17 @@
+#include <cstring>
+#include <msp/core/hash.h>
+#include "tag.h"
+
+namespace Msp {
+namespace GL {
+
+Tag::Tag(const char *s):
+       id((s && *s) ? hash32(s, strlen(s)) : 0)
+{ }
+
+Tag::Tag(const std::string &s):
+       id(s.empty() ? 0 : hash32(s))
+{ }
+
+} // namespace GL
+} // namespace Msp