aboutsummaryrefslogtreecommitdiff
path: root/buildtools/codegen/CodegenDecl.cpp
diff options
context:
space:
mode:
authorrtk0c <[email protected]>2022-05-29 18:30:03 -0700
committerrtk0c <[email protected]>2022-05-29 18:30:03 -0700
commit5112858f9a4adcf76240bcddad19179a5c56d4f3 (patch)
tree22baae0ae1f74be2c9aee241f061cb91f3c30e88 /buildtools/codegen/CodegenDecl.cpp
parent32f00c086b35c5bc32d800b96253b378b9367580 (diff)
Changeset: 47 Add fromstring codegen for enums
Diffstat (limited to 'buildtools/codegen/CodegenDecl.cpp')
-rw-r--r--buildtools/codegen/CodegenDecl.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/buildtools/codegen/CodegenDecl.cpp b/buildtools/codegen/CodegenDecl.cpp
index ac6bb01..7cf21ce 100644
--- a/buildtools/codegen/CodegenDecl.cpp
+++ b/buildtools/codegen/CodegenDecl.cpp
@@ -41,8 +41,9 @@ restart:
return pattern;
}
-void DeclEnum::CalcPatternIfNecessary() {
+EnumValuePattern DeclEnum::GetPattern() const {
if (pattern == EVP_COUNT) {
- CalcPattern();
+ pattern = CalcPattern();
}
+ return pattern;
}