summaryrefslogtreecommitdiff
path: root/deimos/core/id_name.h
diff options
context:
space:
mode:
Diffstat (limited to 'deimos/core/id_name.h')
-rw-r--r--deimos/core/id_name.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/deimos/core/id_name.h b/deimos/core/id_name.h
new file mode 100644
index 0000000..eb961ca
--- /dev/null
+++ b/deimos/core/id_name.h
@@ -0,0 +1,21 @@
+#pragma once
+
+#include "deimos/core/base.h"
+#include "deimos/core/hash.h"
+
+namespace deimos
+{
+
+struct IdName
+{
+ uint128 hash;
+ const char* name;
+
+ explicit constexpr IdName(const char* name) :
+ hash{MurmurHash3_x64_128(name)},
+ name{name}
+ {}
+};
+
+} // namespace deimos
+