C++ style enums 4/N: Errata

Summary: This converts usages of YGErrata to Errata

Differential Revision: D49270354

fbshipit-source-id: 70e61b04543a2431766dfe1e51b0731e8e753188
This commit is contained in:
Nick Gerleman
2023-09-14 20:50:01 -07:00
committed by Facebook GitHub Bot
parent e85cb99267
commit 477e5dc286
8 changed files with 25 additions and 16 deletions

View File

@@ -164,6 +164,9 @@ for name, values in sorted(ENUMS.items()):
ordinal = value[0] if isinstance(value, tuple) else value
f.write(f" {ordinal} = YG{name}{ordinal},\n")
f.write("};\n\n")
f.write(
f"YG_DEFINE_ENUM_FLAG_OPERATORS({name})\n\n" if name in BITSET_ENUMS else ""
)
f.write("template <>\n")
f.write(f"constexpr inline int32_t ordinalCount<{name}>() {{\n")