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.

Reviewed By: rshest

Differential Revision: D45341504

fbshipit-source-id: 0b80588f3e2e167d4c1c722c6d6608408dd617ba
  • Loading branch information
NickGerleman authored and facebook-github-bot committed Apr 27, 2023
1 parent c7dcb42 commit fe6f70b
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 fe6f70b

Please sign in to comment.