From e6a0bf82709469a85abc15be1d9d193bc31518ba Mon Sep 17 00:00:00 2001 From: Jakub Trzebiatowski Date: Sat, 16 Dec 2023 14:28:44 +0100 Subject: [PATCH] Clean up the function naming in `TextMeasureCache.h` One name was clearly a human mistake. Make the naming consistent. --- .../react/renderer/textlayoutmanager/TextMeasureCache.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/react-native/ReactCommon/react/renderer/textlayoutmanager/TextMeasureCache.h b/packages/react-native/ReactCommon/react/renderer/textlayoutmanager/TextMeasureCache.h index c51f4ff51daeac..2e0f1ddb385d76 100644 --- a/packages/react-native/ReactCommon/react/renderer/textlayoutmanager/TextMeasureCache.h +++ b/packages/react-native/ReactCommon/react/renderer/textlayoutmanager/TextMeasureCache.h @@ -141,7 +141,7 @@ inline bool areAttributedStringFragmentsEquivalentLayoutWise( rhs.parentShadowView.layoutMetrics)); } -inline size_t textAttributesHashLayoutWise( +inline size_t attributedStringFragmentHashLayoutWise( const AttributedString::Fragment& fragment) { // Here we are not taking `isAttachment` and `layoutMetrics` into account // because they are logically interdependent and this can break an invariant @@ -171,12 +171,12 @@ inline bool areAttributedStringsEquivalentLayoutWise( return true; } -inline size_t textAttributedStringHashLayoutWise( +inline size_t attributedStringHashLayoutWise( const AttributedString& attributedString) { auto seed = size_t{0}; for (const auto& fragment : attributedString.getFragments()) { - facebook::react::hash_combine(seed, textAttributesHashLayoutWise(fragment)); + facebook::react::hash_combine(seed, attributedStringFragmentHashLayoutWise(fragment)); } return seed; @@ -206,7 +206,7 @@ template <> struct hash { size_t operator()(const facebook::react::TextMeasureCacheKey& key) const { return facebook::react::hash_combine( - textAttributedStringHashLayoutWise(key.attributedString), + attributedStringHashLayoutWise(key.attributedString), key.paragraphAttributes, key.layoutConstraints.maximumSize.width); }