Skip to content

Commit

Permalink
Define Flag operators for YGPrintOptions (#37115)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: #37115

X-link: facebook/yoga#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
  • Loading branch information
NickGerleman authored and facebook-github-bot committed Apr 27, 2023
1 parent d684b0f commit 048401d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions packages/react-native/ReactCommon/yoga/yoga/YGEnums.h
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ YG_ENUM_DECL(
YGPrintOptionsLayout = 1,
YGPrintOptionsStyle = 2,
YGPrintOptionsChildren = 4)
YG_DEFINE_ENUM_FLAG_OPERATORS(YGPrintOptions)

YG_ENUM_SEQ_DECL(
YGUnit,
Expand Down

0 comments on commit 048401d

Please sign in to comment.