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:
Nick Gerleman
2025-01-23 16:19:48 -08:00
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, wont 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();
}
};