From 73980a3cf870c61613231dc13c0f7f59f590f9d4 Mon Sep 17 00:00:00 2001 From: Nolan O'Brien Date: Wed, 2 Jul 2025 14:21:18 -0700 Subject: [PATCH] Fix exhaustive switches Summary: X-link: https://github.com/facebook/react-native/pull/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 --- yoga/YGValue.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/yoga/YGValue.h b/yoga/YGValue.h index 63c82f3d..b7c4ba25 100644 --- a/yoga/YGValue.h +++ b/yoga/YGValue.h @@ -72,9 +72,9 @@ inline bool operator==(const YGValue& lhs, const YGValue& rhs) { case YGUnitPoint: case YGUnitPercent: return lhs.value == rhs.value; + default: + return false; } - - return false; } inline bool operator!=(const YGValue& lhs, const YGValue& rhs) {