diff --git a/packages/react-native/ReactCommon/yoga/yoga/BitUtils.h b/packages/react-native/ReactCommon/yoga/yoga/BitUtils.h index c8247e1390cf4f..e544defae72248 100644 --- a/packages/react-native/ReactCommon/yoga/yoga/BitUtils.h +++ b/packages/react-native/ReactCommon/yoga/yoga/BitUtils.h @@ -10,7 +10,8 @@ #include #include #include -#include "YGEnums.h" + +#include namespace facebook { namespace yoga { diff --git a/packages/react-native/ReactCommon/yoga/yoga/CompactValue.h b/packages/react-native/ReactCommon/yoga/yoga/CompactValue.h index 26859330f3ba16..20462ce35d4fcc 100644 --- a/packages/react-native/ReactCommon/yoga/yoga/CompactValue.h +++ b/packages/react-native/ReactCommon/yoga/yoga/CompactValue.h @@ -7,6 +7,13 @@ #pragma once +#include +#include +#include + +#include +#include + #if defined(__has_include) && __has_include() // needed to be able to evaluate defined(__cpp_lib_bit_cast) #include @@ -20,11 +27,6 @@ #else #include #endif -#include "YGValue.h" -#include "YGMacros.h" -#include -#include -#include static_assert( std::numeric_limits::is_iec559, diff --git a/packages/react-native/ReactCommon/yoga/yoga/YGConfig.h b/packages/react-native/ReactCommon/yoga/yoga/YGConfig.h index 4d4038de9f6e4d..f4e454262c44a1 100644 --- a/packages/react-native/ReactCommon/yoga/yoga/YGConfig.h +++ b/packages/react-native/ReactCommon/yoga/yoga/YGConfig.h @@ -7,9 +7,10 @@ #pragma once -#include "Yoga-internal.h" -#include "Yoga.h" +#include + #include "BitUtils.h" +#include "Yoga-internal.h" namespace facebook { namespace yoga { diff --git a/packages/react-native/ReactCommon/yoga/yoga/YGEnums.cpp b/packages/react-native/ReactCommon/yoga/yoga/YGEnums.cpp index 50cc418a9145ad..96b424a3bfd6e9 100644 --- a/packages/react-native/ReactCommon/yoga/yoga/YGEnums.cpp +++ b/packages/react-native/ReactCommon/yoga/yoga/YGEnums.cpp @@ -7,7 +7,7 @@ // @generated by enums.py -#include "YGEnums.h" +#include const char* YGAlignToString(const YGAlign value) { switch (value) { diff --git a/packages/react-native/ReactCommon/yoga/yoga/YGEnums.h b/packages/react-native/ReactCommon/yoga/yoga/YGEnums.h index eb4fbe7273b51f..72146fe279867e 100644 --- a/packages/react-native/ReactCommon/yoga/yoga/YGEnums.h +++ b/packages/react-native/ReactCommon/yoga/yoga/YGEnums.h @@ -8,7 +8,7 @@ // @generated by enums.py #pragma once -#include "YGMacros.h" +#include // clang-format off diff --git a/packages/react-native/ReactCommon/yoga/yoga/YGNodePrint.cpp b/packages/react-native/ReactCommon/yoga/yoga/YGNodePrint.cpp index 7e53549c26a83c..d4d3499a3f8ae5 100644 --- a/packages/react-native/ReactCommon/yoga/yoga/YGNodePrint.cpp +++ b/packages/react-native/ReactCommon/yoga/yoga/YGNodePrint.cpp @@ -6,9 +6,12 @@ */ #ifdef DEBUG -#include "YGNodePrint.h" + #include -#include "YGEnums.h" + +#include + +#include "YGNodePrint.h" #include "YGNode.h" #include "Yoga-internal.h" #include "Utils.h" diff --git a/packages/react-native/ReactCommon/yoga/yoga/YGNodePrint.h b/packages/react-native/ReactCommon/yoga/yoga/YGNodePrint.h index f06d457c4dd019..ac550e9611c295 100644 --- a/packages/react-native/ReactCommon/yoga/yoga/YGNodePrint.h +++ b/packages/react-native/ReactCommon/yoga/yoga/YGNodePrint.h @@ -11,7 +11,7 @@ #include -#include "Yoga.h" +#include namespace facebook { namespace yoga { diff --git a/packages/react-native/ReactCommon/yoga/yoga/YGStyle.h b/packages/react-native/ReactCommon/yoga/yoga/YGStyle.h index 20ce4e056256b9..4f182d0691ec3f 100644 --- a/packages/react-native/ReactCommon/yoga/yoga/YGStyle.h +++ b/packages/react-native/ReactCommon/yoga/yoga/YGStyle.h @@ -11,11 +11,12 @@ #include #include #include + +#include + #include "CompactValue.h" -#include "YGEnums.h" #include "YGFloatOptional.h" #include "Yoga-internal.h" -#include "Yoga.h" #include "BitUtils.h" class YOGA_EXPORT YGStyle { diff --git a/packages/react-native/ReactCommon/yoga/yoga/YGValue.cpp b/packages/react-native/ReactCommon/yoga/yoga/YGValue.cpp index 89ff41bab117c1..194d22caa87882 100644 --- a/packages/react-native/ReactCommon/yoga/yoga/YGValue.cpp +++ b/packages/react-native/ReactCommon/yoga/yoga/YGValue.cpp @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -#include "YGValue.h" +#include const YGValue YGValueZero = {0, YGUnitPoint}; const YGValue YGValueUndefined = {YGUndefined, YGUnitUndefined}; diff --git a/packages/react-native/ReactCommon/yoga/yoga/YGValue.h b/packages/react-native/ReactCommon/yoga/yoga/YGValue.h index a4f89f3b39a300..59f6f5e46196f1 100644 --- a/packages/react-native/ReactCommon/yoga/yoga/YGValue.h +++ b/packages/react-native/ReactCommon/yoga/yoga/YGValue.h @@ -7,8 +7,8 @@ #pragma once -#include "YGEnums.h" -#include "YGMacros.h" +#include +#include YG_EXTERN_C_BEGIN diff --git a/packages/react-native/ReactCommon/yoga/yoga/Yoga-internal.h b/packages/react-native/ReactCommon/yoga/yoga/Yoga-internal.h index e6f370d6bfa5d2..6f60e4e149cca8 100644 --- a/packages/react-native/ReactCommon/yoga/yoga/Yoga-internal.h +++ b/packages/react-native/ReactCommon/yoga/yoga/Yoga-internal.h @@ -11,8 +11,10 @@ #include #include #include + +#include + #include "CompactValue.h" -#include "Yoga.h" using YGVector = std::vector; diff --git a/packages/react-native/ReactCommon/yoga/yoga/Yoga.cpp b/packages/react-native/ReactCommon/yoga/yoga/Yoga.cpp index 6201efb0252ea9..d9863a2f19dd0f 100644 --- a/packages/react-native/ReactCommon/yoga/yoga/Yoga.cpp +++ b/packages/react-native/ReactCommon/yoga/yoga/Yoga.cpp @@ -5,28 +5,20 @@ * LICENSE file in the root directory of this source tree. */ -#include "Yoga.h" -#include "log.h" #include #include #include #include #include + +#include + +#include "log.h" #include "Utils.h" #include "YGNode.h" #include "YGNodePrint.h" #include "Yoga-internal.h" #include "event/event.h" -#ifdef _MSC_VER -#include - -/* define fmaxf if < VC12 */ -#if _MSC_VER < 1800 -__forceinline const float fmaxf(const float a, const float b) { - return (a > b) ? a : b; -} -#endif -#endif using namespace facebook::yoga; using detail::Log; diff --git a/packages/react-native/ReactCommon/yoga/yoga/Yoga.h b/packages/react-native/ReactCommon/yoga/yoga/Yoga.h index 9e9060b9b4959a..1beb320e08a410 100644 --- a/packages/react-native/ReactCommon/yoga/yoga/Yoga.h +++ b/packages/react-native/ReactCommon/yoga/yoga/Yoga.h @@ -18,9 +18,9 @@ #include #endif -#include "YGEnums.h" -#include "YGMacros.h" -#include "YGValue.h" +#include +#include +#include YG_EXTERN_C_BEGIN diff --git a/packages/react-native/ReactCommon/yoga/yoga/log.cpp b/packages/react-native/ReactCommon/yoga/yoga/log.cpp index dbf7b4376e669c..6cdd3f69f478b3 100644 --- a/packages/react-native/ReactCommon/yoga/yoga/log.cpp +++ b/packages/react-native/ReactCommon/yoga/yoga/log.cpp @@ -5,9 +5,9 @@ * LICENSE file in the root directory of this source tree. */ -#include "log.h" +#include -#include "Yoga.h" +#include "log.h" #include "YGConfig.h" #include "YGNode.h" diff --git a/packages/react-native/ReactCommon/yoga/yoga/log.h b/packages/react-native/ReactCommon/yoga/yoga/log.h index 1d270e82e40b9f..419724e22338e3 100644 --- a/packages/react-native/ReactCommon/yoga/yoga/log.h +++ b/packages/react-native/ReactCommon/yoga/yoga/log.h @@ -7,7 +7,7 @@ #pragma once -#include "YGEnums.h" +#include struct YGNode; struct YGConfig;