Make enum count constexpr
This commit is contained in:
parent
05652be832
commit
acf456811c
@ -2006,7 +2006,7 @@ int main(int argc, char *argv[])
|
|||||||
{
|
{
|
||||||
int count = 0;
|
int count = 0;
|
||||||
for (CPPDeclLinkedList<Slice<char>> *link = parsed_enum->members; link; link = link->next) count++;
|
for (CPPDeclLinkedList<Slice<char>> *link = parsed_enum->members; link; link = link->next) count++;
|
||||||
FprintfIndented(output_file, indent_level, "int DqnInspectEnum_Count(%.*s) { return %d; }\n\n", parsed_enum->name.len, parsed_enum->name.str, count);
|
FprintfIndented(output_file, indent_level, "constexpr int DqnInspectEnum_Count(%.*s) { return %d; }\n\n", parsed_enum->name.len, parsed_enum->name.str, count);
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
|
Loading…
Reference in New Issue
Block a user