aboutsummaryrefslogtreecommitdiff
path: root/buildtools/codegen/CodegenInput.inl
diff options
context:
space:
mode:
authorrtk0c <[email protected]>2022-05-29 16:14:26 -0700
committerrtk0c <[email protected]>2022-05-29 16:14:26 -0700
commit66b63ae887f553e1cac813546a6b827a9c85d80c (patch)
treec404dd9cc6a74853f8ea409cdeeb1419b04cef44 /buildtools/codegen/CodegenInput.inl
parent1a6f1ea3b76c3ed4cad5aba5502af390ce50a2c0 (diff)
Changeset: 43 Add tostring code gen for enums
Diffstat (limited to 'buildtools/codegen/CodegenInput.inl')
-rw-r--r--buildtools/codegen/CodegenInput.inl4
1 files changed, 2 insertions, 2 deletions
diff --git a/buildtools/codegen/CodegenInput.inl b/buildtools/codegen/CodegenInput.inl
index 9fae43c..80a39d0 100644
--- a/buildtools/codegen/CodegenInput.inl
+++ b/buildtools/codegen/CodegenInput.inl
@@ -13,7 +13,7 @@
class CodegenInput {
private:
std::vector<DeclEnum> mEnums;
- robin_hood::unordered_map<std::string_view, size_t> mDeclByName;
+ robin_hood::unordered_map<std::string, size_t, StringHash, StringEqual> mDeclByName;
public:
void AddEnum(DeclEnum decl) {
@@ -24,7 +24,7 @@ public:
}
#endif
- mDeclByName.try_emplace(decl.name, mEnums.size());
+ mDeclByName.try_emplace(std::string(decl.name), mEnums.size());
mEnums.push_back(std::move(decl));
}