Eliminate YGFloatOptional::getValue()
Summary: @public Replace `YGFloatOptional::getValue()` with `YGFloatOptional::unwrap()`. `YGFloatOptional::getValue()` has the unfortunate property of calling `std::exit` if the wrapped value is undefined. Here, we eliminate the method, and just call `.unwrap()` everywhere. Reviewed By: shergin Differential Revision: D13439608 fbshipit-source-id: 5ae82b170537d0a10c301412567a7a66fd50bab4
This commit is contained in:
committed by
Facebook Github Bot
parent
aaa018bbea
commit
4b5ae211da
@@ -43,7 +43,7 @@ static void appendFloatOptionalIfDefined(
|
||||
const string key,
|
||||
const YGFloatOptional num) {
|
||||
if (!num.isUndefined()) {
|
||||
appendFormatedString(base, "%s: %g; ", key.c_str(), num.getValue());
|
||||
appendFormatedString(base, "%s: %g; ", key.c_str(), num.unwrap());
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user