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
@@ -87,16 +87,6 @@ struct YGCachedMeasurement {
|
||||
// layouts should not require more than 16 entries to fit within the cache.
|
||||
#define YG_MAX_CACHED_RESULT_COUNT 16
|
||||
|
||||
struct YGConfig {
|
||||
bool experimentalFeatures[YGExperimentalFeatureCount + 1];
|
||||
bool useWebDefaults;
|
||||
bool useLegacyStretchBehaviour;
|
||||
bool shouldDiffLayoutWithoutLegacyStretchBehaviour;
|
||||
float pointScaleFactor;
|
||||
YGLogger logger;
|
||||
YGCloneNodeFunc cloneNodeCallback;
|
||||
void* context;
|
||||
};
|
||||
|
||||
static const float kDefaultFlexGrow = 0.0f;
|
||||
static const float kDefaultFlexShrink = 0.0f;
|
||||
|
Reference in New Issue
Block a user