Tidy up YGFloatOptional further
Summary: I missed these two things: inline default ctor, getValue() should return a float. Reviewed By: priteshrnandgaonkar Differential Revision: D8826640 fbshipit-source-id: e6324dea0268ef276e6fa1722e72dffb5241e676
This commit is contained in:
committed by
Facebook Github Bot
parent
0b1780a081
commit
2562c029b1
@@ -20,9 +20,7 @@ YGFloatOptional::YGFloatOptional(float value) {
|
||||
}
|
||||
}
|
||||
|
||||
YGFloatOptional::YGFloatOptional() : value_(0), isUndefined_(true) {}
|
||||
|
||||
const float& YGFloatOptional::getValue() const {
|
||||
float YGFloatOptional::getValue() const {
|
||||
if (isUndefined_) {
|
||||
// Abort, accessing a value of an undefined float optional
|
||||
std::cerr << "Tried to get value of an undefined YGFloatOptional\n";
|
||||
|
Reference in New Issue
Block a user