mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Remove redundant check in CSSRatio (#48842)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/48842 This is a result of inlining isinf previously but we can never be negative infinity because we can never be less than zero. Changelog: [Internal] Reviewed By: lenaic Differential Revision: D68474836 fbshipit-source-id: bfce78c4bd269ff2afac99c03250ede676ee1029
This commit is contained in:
committed by
Facebook GitHub Bot
parent
a4b112cb0b
commit
91add1e4e0
@@ -54,8 +54,7 @@ struct CSSDataTypeParser<CSSRatio> {
|
||||
// If either number in the <ratio> is 0 or infinite, it represents a
|
||||
// degenerate ratio (and, generally, won’t do anything).
|
||||
// https://www.w3.org/TR/css-values-4/#ratios
|
||||
return value > 0.0f && value != +std::numeric_limits<float>::infinity() &&
|
||||
value != -std::numeric_limits<float>::infinity();
|
||||
return value > 0.0f && value != +std::numeric_limits<float>::infinity();
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user