Make the return type of YGNodeBoundAxisWithinMinAndMax to YGFloatOptional
Summary: Make the return type of YGNodeBoundAxisWithinMinAndMax to YGFloatOptional Reviewed By: emilsjolander Differential Revision: D7323382 fbshipit-source-id: 8e3eb4f3744b5f3f9e2b353f56184905f7557191
This commit is contained in:
committed by
Facebook Github Bot
parent
bb139d3f91
commit
a3642541d0
@@ -68,3 +68,25 @@ YGFloatOptional YGFloatOptional::operator+(const YGFloatOptional& op) {
|
||||
}
|
||||
return YGFloatOptional();
|
||||
}
|
||||
|
||||
bool YGFloatOptional::operator>(const YGFloatOptional& op) const {
|
||||
if (isUndefined_ || op.isUndefined_) {
|
||||
return false;
|
||||
}
|
||||
return value_ > op.value_;
|
||||
}
|
||||
|
||||
bool YGFloatOptional::operator<(const YGFloatOptional& op) const {
|
||||
if (isUndefined_ || op.isUndefined_) {
|
||||
return false;
|
||||
}
|
||||
return value_ < op.value_;
|
||||
}
|
||||
|
||||
bool YGFloatOptional::operator>=(const YGFloatOptional& op) const {
|
||||
return *this == op ? true : *this > op;
|
||||
}
|
||||
|
||||
bool YGFloatOptional::operator<=(const YGFloatOptional& op) const {
|
||||
return *this == op ? true : *this < op;
|
||||
}
|
||||
|
Reference in New Issue
Block a user