Back out Stack D13119110..D13236159
Summary: backout, causes failures Reviewed By: adityasharat Differential Revision: D13376210 fbshipit-source-id: 1fa8823f2dce601c47738f34ddb2674288197e79
This commit is contained in:
committed by
Facebook Github Bot
parent
6b7f6980f9
commit
b26e637c81
@@ -1,56 +0,0 @@
|
||||
/**
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the LICENSE
|
||||
* file in the root directory of this source tree.
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <math.h>
|
||||
#include "YGEnums.h"
|
||||
#include "YGMacros.h"
|
||||
|
||||
YG_EXTERN_C_BEGIN
|
||||
|
||||
// Not defined in MSVC++
|
||||
#ifndef NAN
|
||||
static const uint32_t __nan = 0x7fc00000;
|
||||
#define NAN (*(const float*)__nan)
|
||||
#endif
|
||||
|
||||
#define YGUndefined NAN
|
||||
|
||||
typedef struct YGValue {
|
||||
float value;
|
||||
YGUnit unit;
|
||||
} YGValue;
|
||||
|
||||
extern const YGValue YGValueAuto;
|
||||
extern const YGValue YGValueUndefined;
|
||||
extern const YGValue YGValueZero;
|
||||
|
||||
YG_EXTERN_C_END
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
inline bool operator==(const YGValue& lhs, const YGValue& rhs) {
|
||||
if (lhs.unit != rhs.unit) {
|
||||
return false;
|
||||
}
|
||||
|
||||
switch (lhs.unit) {
|
||||
case YGUnitUndefined:
|
||||
case YGUnitAuto:
|
||||
return true;
|
||||
case YGUnitPoint:
|
||||
case YGUnitPercent:
|
||||
default:
|
||||
return lhs.value == rhs.value;
|
||||
}
|
||||
}
|
||||
|
||||
inline bool operator!=(const YGValue& lhs, const YGValue& rhs) {
|
||||
return !(lhs == rhs);
|
||||
}
|
||||
|
||||
#endif
|
Reference in New Issue
Block a user