diff --git a/ReactCommon/fabric/components/image/conversions.h b/ReactCommon/fabric/components/image/conversions.h index 015c8f01d6..3c42d9efff 100644 --- a/ReactCommon/fabric/components/image/conversions.h +++ b/ReactCommon/fabric/components/image/conversions.h @@ -7,6 +7,7 @@ #pragma once +#include #include #include #include @@ -20,8 +21,8 @@ inline void fromRawValue(const RawValue &value, ImageSource &result) { return; } - if (value.hasType>()) { - auto items = (std::unordered_map)value; + if (value.hasType>()) { + auto items = (better::map)value; result = {}; result.type = ImageSource::Type::Remote; diff --git a/ReactCommon/fabric/components/view/conversions.h b/ReactCommon/fabric/components/view/conversions.h index 46d99ff132..a4fe368f6a 100644 --- a/ReactCommon/fabric/components/view/conversions.h +++ b/ReactCommon/fabric/components/view/conversions.h @@ -7,6 +7,7 @@ #pragma once +#include #include #include #include @@ -361,8 +362,7 @@ inline void fromRawValue(const RawValue &value, Transform &result) { auto configurations = (std::vector)value; for (const auto &configuration : configurations) { - auto configurationPair = - (std::unordered_map)configuration; + auto configurationPair = (better::map)configuration; auto pair = configurationPair.begin(); auto operation = pair->first; auto ¶meters = pair->second; diff --git a/ReactCommon/fabric/core/primitives/RawProps.h b/ReactCommon/fabric/core/primitives/RawProps.h index 6feed6afa6..0e1b52c11b 100644 --- a/ReactCommon/fabric/core/primitives/RawProps.h +++ b/ReactCommon/fabric/core/primitives/RawProps.h @@ -7,6 +7,7 @@ #pragma once +#include #include #include #include @@ -46,7 +47,7 @@ class RawProps { #ifdef ANDROID dynamic_(dynamic), #endif - map_((std::unordered_map)RawValue(dynamic)) { + map_((better::map)RawValue(dynamic)) { } /* @@ -90,7 +91,7 @@ class RawProps { const folly::dynamic dynamic_; #endif - const std::unordered_map map_; + const better::map map_; }; } // namespace react diff --git a/ReactCommon/fabric/core/primitives/RawValue.h b/ReactCommon/fabric/core/primitives/RawValue.h index c7acfa9bce..14a3bcacde 100644 --- a/ReactCommon/fabric/core/primitives/RawValue.h +++ b/ReactCommon/fabric/core/primitives/RawValue.h @@ -7,6 +7,7 @@ #pragma once +#include #include #include #include @@ -180,7 +181,7 @@ class RawValue { template static bool checkValueType( const folly::dynamic &dynamic, - std::unordered_map *type) noexcept { + better::map *type) noexcept { if (!dynamic.isObject()) { return false; } @@ -249,11 +250,11 @@ class RawValue { } template - static std::unordered_map castValue( + static better::map castValue( const folly::dynamic &dynamic, - std::unordered_map *type) noexcept { + better::map *type) noexcept { assert(dynamic.isObject()); - auto result = std::unordered_map{}; + auto result = better::map{}; for (const auto &item : dynamic.items()) { assert(item.first.isString()); result[item.first.getString()] = castValue(item.second, (T *)nullptr); diff --git a/ReactCommon/fabric/graphics/conversions.h b/ReactCommon/fabric/graphics/conversions.h index 4cd7e456d4..2b8e645d75 100644 --- a/ReactCommon/fabric/graphics/conversions.h +++ b/ReactCommon/fabric/graphics/conversions.h @@ -7,6 +7,7 @@ #pragma once +#include #include #include #include @@ -70,8 +71,8 @@ inline std::string toString(const SharedColor &value) { #pragma mark - Geometry inline void fromRawValue(const RawValue &value, Point &result) { - if (value.hasType>()) { - auto map = (std::unordered_map)value; + if (value.hasType>()) { + auto map = (better::map)value; result = {map.at("x"), map.at("y")}; return; } @@ -87,8 +88,8 @@ inline void fromRawValue(const RawValue &value, Point &result) { } inline void fromRawValue(const RawValue &value, Size &result) { - if (value.hasType>()) { - auto map = (std::unordered_map)value; + if (value.hasType>()) { + auto map = (better::map)value; result = {map.at("width"), map.at("height")}; return; } @@ -109,8 +110,8 @@ inline void fromRawValue(const RawValue &value, EdgeInsets &result) { result = {number, number, number, number}; } - if (value.hasType>()) { - auto map = (std::unordered_map)value; + if (value.hasType>()) { + auto map = (better::map)value; result = {map.at("top"), map.at("left"), map.at("bottom"), map.at("right")}; return; } @@ -131,8 +132,8 @@ inline void fromRawValue(const RawValue &value, CornerInsets &result) { result = {number, number, number, number}; } - if (value.hasType>()) { - auto map = (std::unordered_map)value; + if (value.hasType>()) { + auto map = (better::map)value; result = {map.at("topLeft"), map.at("topRight"), map.at("bottomLeft"),