diff --git a/packages/react-native/ReactCommon/react/renderer/attributedstring/AttributedString.h b/packages/react-native/ReactCommon/react/renderer/attributedstring/AttributedString.h index 798ad5940a3..45f351ce18a 100644 --- a/packages/react-native/ReactCommon/react/renderer/attributedstring/AttributedString.h +++ b/packages/react-native/ReactCommon/react/renderer/attributedstring/AttributedString.h @@ -7,15 +7,14 @@ #pragma once -#include #include -#include #include #include #include #include #include +#include namespace facebook::react { @@ -123,8 +122,7 @@ template <> struct hash { size_t operator()( const facebook::react::AttributedString::Fragment& fragment) const { - return folly::hash::hash_combine( - 0, + return facebook::react::hash_combine( fragment.string, fragment.textAttributes, fragment.parentShadowView, @@ -139,7 +137,7 @@ struct hash { auto seed = size_t{0}; for (const auto& fragment : attributedString.getFragments()) { - seed = folly::hash::hash_combine(seed, fragment); + facebook::react::hash_combine(seed, fragment); } return seed; diff --git a/packages/react-native/ReactCommon/react/renderer/attributedstring/ParagraphAttributes.h b/packages/react-native/ReactCommon/react/renderer/attributedstring/ParagraphAttributes.h index 591e15b3787..d73f8632b84 100644 --- a/packages/react-native/ReactCommon/react/renderer/attributedstring/ParagraphAttributes.h +++ b/packages/react-native/ReactCommon/react/renderer/attributedstring/ParagraphAttributes.h @@ -9,10 +9,10 @@ #include -#include #include #include #include +#include namespace facebook::react { @@ -88,8 +88,7 @@ template <> struct hash { size_t operator()( const facebook::react::ParagraphAttributes& attributes) const { - return folly::hash::hash_combine( - 0, + return facebook::react::hash_combine( attributes.maximumNumberOfLines, attributes.ellipsizeMode, attributes.textBreakStrategy, diff --git a/packages/react-native/ReactCommon/react/renderer/components/text/ParagraphLayoutManager.cpp b/packages/react-native/ReactCommon/react/renderer/components/text/ParagraphLayoutManager.cpp index 0ba10c69e46..715a1d2798b 100644 --- a/packages/react-native/ReactCommon/react/renderer/components/text/ParagraphLayoutManager.cpp +++ b/packages/react-native/ReactCommon/react/renderer/components/text/ParagraphLayoutManager.cpp @@ -6,8 +6,8 @@ */ #include "ParagraphLayoutManager.h" -#include #include +#include namespace facebook::react { @@ -43,7 +43,7 @@ bool ParagraphLayoutManager::shoudMeasureString( const ParagraphAttributes& paragraphAttributes, LayoutConstraints layoutConstraints) const { size_t newParagraphInputHash = - folly::hash::hash_combine(0, attributedString, paragraphAttributes); + hash_combine(attributedString, paragraphAttributes); if (newParagraphInputHash != paragraphInputHash_) { // AttributedString or ParagraphAttributes have changed.