remove folly::hash from graphics module (#39507)

Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/39507

changelog: [internal]

Reviewed By: cipolleschi

Differential Revision: D49349976

fbshipit-source-id: 5762b56b853640c21a13167b4ae2b8f966273fce
This commit is contained in:
Samuel Susla
2023-09-22 05:53:13 -07:00
committed by Facebook GitHub Bot
parent 43eb18b1ae
commit 351b1a20d7
8 changed files with 15 additions and 16 deletions
@@ -24,4 +24,4 @@ target_include_directories(react_render_graphics
${CMAKE_CURRENT_SOURCE_DIR}/platform/android/
)
target_link_libraries(react_render_graphics glog fb fbjni folly_runtime react_debug)
target_link_libraries(react_render_graphics glog fb fbjni folly_runtime react_debug react_utils)
@@ -9,8 +9,8 @@
#include <tuple>
#include <folly/Hash.h>
#include <react/renderer/graphics/Float.h>
#include <react/utils/hash_combine.h>
namespace facebook::react {
@@ -63,7 +63,7 @@ namespace std {
template <>
struct hash<facebook::react::Point> {
size_t operator()(const facebook::react::Point& point) const noexcept {
return folly::hash::hash_combine(0, point.x, point.y);
return facebook::react::hash_combine(point.x, point.y);
}
};
@@ -57,4 +57,5 @@ Pod::Spec.new do |s|
s.dependency "glog"
s.dependency "RCT-Folly/Fabric", folly_version
s.dependency "React-Core/Default", version
s.dependency "React-utils"
end
@@ -10,10 +10,10 @@
#include <algorithm>
#include <tuple>
#include <folly/Hash.h>
#include <react/renderer/graphics/Float.h>
#include <react/renderer/graphics/Point.h>
#include <react/renderer/graphics/Size.h>
#include <react/utils/hash_combine.h>
namespace facebook::react {
@@ -125,7 +125,7 @@ namespace std {
template <>
struct hash<facebook::react::Rect> {
size_t operator()(const facebook::react::Rect& rect) const noexcept {
return folly::hash::hash_combine(0, rect.origin, rect.size);
return facebook::react::hash_combine(rect.origin, rect.size);
}
};
@@ -9,8 +9,8 @@
#include <tuple>
#include <folly/Hash.h>
#include <react/renderer/graphics/Float.h>
#include <react/utils/hash_combine.h>
namespace facebook::react {
@@ -57,8 +57,7 @@ template <typename T>
struct hash<facebook::react::RectangleCorners<T>> {
size_t operator()(
const facebook::react::RectangleCorners<T>& corners) const noexcept {
return folly::hash::hash_combine(
0,
return facebook::react::hash_combine(
corners.topLeft,
corners.bottomLeft,
corners.topRight,
@@ -9,9 +9,9 @@
#include <tuple>
#include <folly/Hash.h>
#include <react/renderer/graphics/Float.h>
#include <react/renderer/graphics/Rect.h>
#include <react/utils/hash_combine.h>
namespace facebook::react {
@@ -100,8 +100,8 @@ template <typename T>
struct hash<facebook::react::RectangleEdges<T>> {
size_t operator()(
const facebook::react::RectangleEdges<T>& edges) const noexcept {
return folly::hash::hash_combine(
0, edges.left, edges.right, edges.top, edges.bottom);
return facebook::react::hash_combine(
edges.left, edges.right, edges.top, edges.bottom);
}
};
@@ -9,9 +9,9 @@
#include <tuple>
#include <folly/Hash.h>
#include <react/renderer/graphics/Float.h>
#include <react/renderer/graphics/Point.h>
#include <react/utils/hash_combine.h>
namespace facebook::react {
@@ -50,7 +50,7 @@ namespace std {
template <>
struct hash<facebook::react::Size> {
size_t operator()(const facebook::react::Size& size) const {
return folly::hash::hash_combine(0, size.width, size.height);
return facebook::react::hash_combine(size.width, size.height);
}
};
@@ -10,13 +10,13 @@
#include <array>
#include <vector>
#include <folly/Hash.h>
#include <react/renderer/graphics/Float.h>
#include <react/renderer/graphics/Point.h>
#include <react/renderer/graphics/RectangleEdges.h>
#include <react/renderer/graphics/Size.h>
#include <react/renderer/graphics/ValueUnit.h>
#include <react/renderer/graphics/Vector.h>
#include <react/utils/hash_combine.h>
#ifdef ANDROID
#include <folly/dynamic.h>
@@ -232,8 +232,7 @@ namespace std {
template <>
struct hash<facebook::react::Transform> {
size_t operator()(const facebook::react::Transform& transform) const {
return folly::hash::hash_combine(
0,
return facebook::react::hash_combine(
transform.matrix[0],
transform.matrix[1],
transform.matrix[2],