From fe6f70b9139d97cff24dac6a60b724848e65a5d1 Mon Sep 17 00:00:00 2001 From: Nick Gerleman Date: Thu, 27 Apr 2023 03:15:14 -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. Reviewed By: rshest Differential Revision: D45341504 fbshipit-source-id: 0b80588f3e2e167d4c1c722c6d6608408dd617ba --- 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,