diff --git a/ReactCommon/yoga/yoga/YGFloatOptional.cpp b/ReactCommon/yoga/yoga/YGFloatOptional.cpp index d023dccb6..da7b8ce83 100644 --- a/ReactCommon/yoga/yoga/YGFloatOptional.cpp +++ b/ReactCommon/yoga/yoga/YGFloatOptional.cpp @@ -53,7 +53,7 @@ bool YGFloatOptional::operator!=(float val) const { return !(*this == val); } -YGFloatOptional YGFloatOptional::operator+(const YGFloatOptional& op) { +YGFloatOptional YGFloatOptional::operator+(const YGFloatOptional& op) const { if (!isUndefined_ && !op.isUndefined_) { return YGFloatOptional(value_ + op.value_); } diff --git a/ReactCommon/yoga/yoga/YGFloatOptional.h b/ReactCommon/yoga/yoga/YGFloatOptional.h index 07fbb64b3..6f4af241f 100644 --- a/ReactCommon/yoga/yoga/YGFloatOptional.h +++ b/ReactCommon/yoga/yoga/YGFloatOptional.h @@ -30,7 +30,7 @@ struct YGFloatOptional { return isUndefined_; } - YGFloatOptional operator+(const YGFloatOptional& op); + YGFloatOptional operator+(const YGFloatOptional& op) const; bool operator>(const YGFloatOptional& op) const; bool operator<(const YGFloatOptional& op) const; bool operator>=(const YGFloatOptional& op) const;