File tree Expand file tree Collapse file tree 4 files changed +4
-9
lines changed
packages/react-native/ReactCommon/react/renderer Expand file tree Collapse file tree 4 files changed +4
-9
lines changed Original file line number Diff line number Diff line change 11
11
#include < limits>
12
12
#include < optional>
13
13
14
- #include < folly/Hash.h>
15
14
#include < react/renderer/attributedstring/primitives.h>
16
15
#include < react/renderer/components/view/AccessibilityPrimitives.h>
17
16
#include < react/renderer/core/LayoutPrimitives.h>
20
19
#include < react/renderer/graphics/Color.h>
21
20
#include < react/renderer/graphics/Float.h>
22
21
#include < react/renderer/graphics/Size.h>
22
+ #include < react/utils/hash_combine.h>
23
23
24
24
namespace facebook ::react {
25
25
@@ -108,8 +108,7 @@ template <>
108
108
struct hash <facebook::react::TextAttributes> {
109
109
size_t operator ()(
110
110
const facebook::react::TextAttributes& textAttributes) const {
111
- return folly::hash::hash_combine (
112
- 0 ,
111
+ return facebook::react::hash_combine (
113
112
textAttributes.foregroundColor ,
114
113
textAttributes.backgroundColor ,
115
114
textAttributes.opacity ,
Original file line number Diff line number Diff line change 7
7
8
8
#include " RawPropsParser.h"
9
9
10
- #include < folly/Hash.h>
11
10
#include < folly/Likely.h>
12
11
#include < react/debug/react_native_assert.h>
13
12
#include < react/renderer/core/RawProps.h>
Original file line number Diff line number Diff line change 7
7
8
8
#pragma once
9
9
10
- #include < folly/Hash.h>
11
10
#include < limits>
12
11
13
12
namespace facebook ::react {
Original file line number Diff line number Diff line change @@ -178,8 +178,7 @@ inline size_t textAttributedStringHashLayoutWise(
178
178
auto seed = size_t {0 };
179
179
180
180
for (const auto & fragment : attributedString.getFragments ()) {
181
- seed =
182
- folly::hash::hash_combine (seed, textAttributesHashLayoutWise (fragment));
181
+ facebook::react::hash_combine (seed, textAttributesHashLayoutWise (fragment));
183
182
}
184
183
185
184
return seed;
@@ -208,8 +207,7 @@ namespace std {
208
207
template <>
209
208
struct hash <facebook::react::TextMeasureCacheKey> {
210
209
size_t operator ()(const facebook::react::TextMeasureCacheKey& key) const {
211
- return folly::hash::hash_combine (
212
- 0 ,
210
+ return facebook::react::hash_combine (
213
211
textAttributedStringHashLayoutWise (key.attributedString ),
214
212
key.paragraphAttributes ,
215
213
key.layoutConstraints .maximumSize .width );
You can’t perform that action at this time.
0 commit comments