Skip to content

Commit 80bcacd

Browse files
committed
refact(Android): rename compareFrameSizes to checkFrameSizesEqualWithEps (#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
1 parent 1062e00 commit 80bcacd

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

common/cpp/react/renderer/components/rnscreens/RNSScreenComponentDescriptor.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ class RNSScreenComponentDescriptor final
5151
// state update.
5252
if (screenShadowNode.getFrameCorrectionModes().check(
5353
FrameCorrectionModes::Mode::FrameHeightCorrection) &&
54-
!compareFrameSizes(
54+
!checkFrameSizesEqualWithEps(
5555
screenShadowNode.layoutMetrics_.frame.size,
5656
stateData.frameSize)) {
5757
LOG(ERROR)

common/cpp/react/renderer/components/rnscreens/utils/RectUtil.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ inline constexpr bool equalWithRespectToEps(const T a, const T b, const T eps) {
2525
* @return whether the frame dimensions are the same with respect to given
2626
* epsilon
2727
*/
28-
inline constexpr bool compareFrameSizes(
28+
inline constexpr bool checkFrameSizesEqualWithEps(
2929
const react::Size &first,
3030
const react::Size &second,
3131
const react::Float eps = 0.01) {

0 commit comments

Comments
 (0)