Skip to content

Commit

Permalink
refact(Android): rename compareFrameSizes to `checkFrameSizesEqualW…
Browse files Browse the repository at this point in the history
…ithEps` (#2217)

## Description

As suggested by @alduzy, new the new function name should better convey
its behaviour.
Old came `compareFrameSizes` could suggest inequality.

## Changes

Renamed `compareFrameSizes` to `checkFrameSizesEqualWithEps`.

## Test code and steps to reproduce

Android should build on Fabric => CI

## Checklist

- [ ] Ensured that CI passes
  • Loading branch information
kkafar authored Jun 27, 2024
1 parent 9bda252 commit a9bc111
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ class RNSScreenComponentDescriptor final
// state update.
if (screenShadowNode.getFrameCorrectionModes().check(
FrameCorrectionModes::Mode::FrameHeightCorrection) &&
!compareFrameSizes(
!checkFrameSizesEqualWithEps(
screenShadowNode.layoutMetrics_.frame.size,
stateData.frameSize)) {
LOG(ERROR)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ inline constexpr bool equalWithRespectToEps(const T a, const T b, const T eps) {
* @return whether the frame dimensions are the same with respect to given
* epsilon
*/
inline constexpr bool compareFrameSizes(
inline constexpr bool checkFrameSizesEqualWithEps(
const react::Size &first,
const react::Size &second,
const react::Float eps = 0.01) {
Expand Down

0 comments on commit a9bc111

Please sign in to comment.