C++ style enums 1/N: Generator (#1384)
Summary: Pull Request resolved: https://github.com/facebook/yoga/pull/1384 X-link: https://github.com/facebook/react-native/pull/39446 This adds logic to the enum generator to generate C++ style scoped enums. This gives us a few nicities over C enums, even if both must exist: 1. We can add types and keep unsgined enums directly in bitfields 2. Style/readability 3. Avoiding implicit int conversion Reviewed By: rozele Differential Revision: D49267996 fbshipit-source-id: 1c41164c377b317c1fef97811c46cbc00b5a837e
This commit is contained in:
committed by
Facebook GitHub Bot
parent
c60050d0cb
commit
4cd45ac5d5
@@ -6,7 +6,7 @@
|
||||
*/
|
||||
|
||||
// @generated by enums.py
|
||||
|
||||
// clang-format off
|
||||
#include <yoga/YGEnums.h>
|
||||
|
||||
const char* YGAlignToString(const YGAlign value) {
|
||||
|
Reference in New Issue
Block a user