From 048401d745f15fd9f981b99b00cf9e585ab46c18 Mon Sep 17 00:00:00 2001 From: Nick Gerleman Date: Wed, 26 Apr 2023 22:00:31 -0700 Subject: [PATCH] Define Flag operators for YGPrintOptions (#37115) Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/37115 X-link: https://github.com/facebook/yoga/pull/1267 This is an existing bitset enum in the API. Use the facility added in the last diff to add flag operators to it, to avoid the need for casting, and to make it clearer in the generated YGEnums.h that it is a bitset. Differential Revision: D45341504 fbshipit-source-id: 62a3e75b18b667c0cd30d19fe2088ddfd4f68c6e --- packages/react-native/ReactCommon/yoga/yoga/YGEnums.h | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/react-native/ReactCommon/yoga/yoga/YGEnums.h b/packages/react-native/ReactCommon/yoga/yoga/YGEnums.h index 13840694b91c4d..eb4fbe7273b51f 100644 --- a/packages/react-native/ReactCommon/yoga/yoga/YGEnums.h +++ b/packages/react-native/ReactCommon/yoga/yoga/YGEnums.h @@ -127,6 +127,7 @@ YG_ENUM_DECL( YGPrintOptionsLayout = 1, YGPrintOptionsStyle = 2, YGPrintOptionsChildren = 4) +YG_DEFINE_ENUM_FLAG_OPERATORS(YGPrintOptions) YG_ENUM_SEQ_DECL( YGUnit,