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
This commit is contained in:
committed by
Facebook Github Bot
parent
9550126f76
commit
6b08db68bb
19
yoga/YGConfig.cpp
Normal file
19
yoga/YGConfig.cpp
Normal file
@@ -0,0 +1,19 @@
|
||||
/**
|
||||
* 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) {}
|
Reference in New Issue
Block a user