Skip to content

Commit 9079b53

Browse files
NSProgrammerfacebook-github-bot
authored andcommitted
Fix exhaustive switches (#52379)
Summary: Pull Request resolved: #52379 Changelog: [General][Fixed] - Add `default:` case to avoid warnings/errors for targets that compile with `-Wswitch-enum` and `-Wswitch-default` enabled Reviewed By: aary, yungsters, astreet Differential Revision: D77051152 fbshipit-source-id: 100b10f97cb3a5d73f1e3dcaf1b284baf6a43982
1 parent da23346 commit 9079b53

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

  • packages/react-native/ReactCommon/yoga/yoga

packages/react-native/ReactCommon/yoga/yoga/YGValue.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,9 @@ inline bool operator==(const YGValue& lhs, const YGValue& rhs) {
7272
case YGUnitPoint:
7373
case YGUnitPercent:
7474
return lhs.value == rhs.value;
75+
default:
76+
return false;
7577
}
76-
77-
return false;
7878
}
7979

8080
inline bool operator!=(const YGValue& lhs, const YGValue& rhs) {

0 commit comments

Comments
 (0)