summaryrefslogtreecommitdiff
path: root/deimos/core/id_name.h
diff options
context:
space:
mode:
authorSteven Le Rouzic <steven.lerouzic@gmail.com>2024-03-24 23:49:26 +0100
committerSteven Le Rouzic <steven.lerouzic@gmail.com>2024-03-24 23:49:26 +0100
commit00c0d78199fcfbbb20828be5e06fd2d271fa4c1e (patch)
treee74aa52990af33f7bf1e4d452b464c3e24d1017e /deimos/core/id_name.h
Initial commit
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
+