Make YGFloatIsUndefined
inlineable
Summary: @public Makes `YGFloatIsUndefined` inlineable Reviewed By: swolchok Differential Revision: D8875520 fbshipit-source-id: 7ac653e002512b1a8d5f9c04e0a21381aeb02e67
This commit is contained in:
committed by
Facebook Github Bot
parent
1b32c4f054
commit
c1a9f6120a
@@ -9,9 +9,12 @@
|
||||
#include <cstdlib>
|
||||
#include <iostream>
|
||||
#include "Yoga.h"
|
||||
#include "Yoga-internal.h"
|
||||
|
||||
using namespace facebook;
|
||||
|
||||
YGFloatOptional::YGFloatOptional(float value) {
|
||||
if (YGFloatIsUndefined(value)) {
|
||||
if (yoga::isUndefined(value)) {
|
||||
isUndefined_ = true;
|
||||
value_ = 0;
|
||||
} else {
|
||||
@@ -41,7 +44,7 @@ bool YGFloatOptional::operator!=(const YGFloatOptional& op) const {
|
||||
}
|
||||
|
||||
bool YGFloatOptional::operator==(float val) const {
|
||||
if (YGFloatIsUndefined(val) == isUndefined_) {
|
||||
if (yoga::isUndefined(val) == isUndefined_) {
|
||||
return isUndefined_ || val == value_;
|
||||
}
|
||||
return false;
|
||||
|
Reference in New Issue
Block a user