mirror of
https://github.com/status-im/react-native.git
synced 2025-01-16 04:24:15 +00:00
24f574032a
Summary: This PR fixes the compilation on MSVC. I moved the `YGConfig` creation to a C++ constructor. Addionally it removes the "dot" notation on `YGValue`, I didn't want to change that type to a C++ constructor, because I think this will break the ABI. Closes https://github.com/facebook/yoga/pull/746 Differential Revision: D7498141 Pulled By: emilsjolander fbshipit-source-id: 5f5308ff838dcd803065785ddc08b2404524acb9
20 lines
632 B
C++
20 lines
632 B
C++
/**
|
|
* Copyright (c) 2014-present, Facebook, Inc.
|
|
*
|
|
* This source code is licensed under the MIT license found in the
|
|
* LICENSE file in the root directory of this source tree.
|
|
*/
|
|
|
|
#include "YGConfig.h"
|
|
|
|
const std::array<bool, YGExperimentalFeatureCount>
|
|
kYGDefaultExperimentalFeatures = {{false}};
|
|
|
|
YGConfig::YGConfig(YGLogger logger)
|
|
: experimentalFeatures(kYGDefaultExperimentalFeatures),
|
|
useWebDefaults(false),
|
|
useLegacyStretchBehaviour(false),
|
|
shouldDiffLayoutWithoutLegacyStretchBehaviour(false),
|
|
pointScaleFactor(1.0f), logger(logger), cloneNodeCallback(nullptr),
|
|
context(nullptr) {}
|