C++ style enums 4/N: Errata (#1388)

Summary:
X-link: https://github.com/facebook/react-native/pull/39451

Pull Request resolved: https://github.com/facebook/yoga/pull/1388

This converts usages of YGErrata to Errata

Reviewed By: rozele

Differential Revision: D49270354

fbshipit-source-id: 39c0d26a1609cca0a96da843796ab41c81e3af93
This commit is contained in:
Nick Gerleman
2023-09-14 23:06:34 -07:00
committed by Facebook GitHub Bot
parent 42e1f2c737
commit 6f5eaefc51
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")