mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
avoid default when switching on UnitType (#46146)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/46146 Changelog: [Internal] `unit` is of type `UnitType`, so there's no reason to have a default case here. i found this because my build failed when pulling in this dependency, there was a compiler flag that enforced that all cases must be enumerated. this seems like the right practice anyways. Reviewed By: NickGerleman Differential Revision: D61635463 fbshipit-source-id: b84b5518f2a17e792309f85ae91514a17abad295
This commit is contained in:
committed by
Facebook GitHub Bot
parent
524a3f0476
commit
42dcfdd2cd
@@ -35,7 +35,7 @@ struct ValueUnit {
|
||||
return value;
|
||||
case UnitType::Percent:
|
||||
return value * referenceLength * 0.01f;
|
||||
default:
|
||||
case UnitType::Undefined:
|
||||
return 0.0f;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user