From 8776b737483f579d2d2034bb91efe0794bf67d92 Mon Sep 17 00:00:00 2001 From: rtk0c Date: Thu, 7 Jul 2022 19:35:40 -0700 Subject: Changeset: 81 Replace DeclEnum::underlyingTypeStr with a lookup function from the enumeration value DeclEnum::underlyingType --- source/20-codegen-compiler/CodegenDecl.hpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'source/20-codegen-compiler/CodegenDecl.hpp') diff --git a/source/20-codegen-compiler/CodegenDecl.hpp b/source/20-codegen-compiler/CodegenDecl.hpp index 00fc18e..d99f79c 100644 --- a/source/20-codegen-compiler/CodegenDecl.hpp +++ b/source/20-codegen-compiler/CodegenDecl.hpp @@ -88,7 +88,6 @@ struct DeclEnum { std::string_view fullname; std::vector elements; EnumUnderlyingType underlyingType; - std::string underlyingTypeStr; // Start with invalid value, calculate on demand mutable EnumValuePattern pattern = EVP_COUNT; @@ -102,6 +101,8 @@ struct DeclEnum { // NOTE: see GenerateForEnum() for the exact heuristics bool generateExcludeUseHeuristics : 1 = false; + std::string_view GetUnderlyingTypeName() const; + EnumValuePattern CalcPattern() const; EnumValuePattern GetPattern() const; }; -- cgit v1.2.3-70-g09d2