Lukas Wöhrl 24f574032a Fix compilation on MSVC by moving YGConfig to C++
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
2018-04-04 10:00:53 -07:00

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) {}