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:
David Aurelio
2018-12-13 07:09:30 -08:00
committed by Facebook Github Bot
parent aaa018bbea
commit 4b5ae211da
9 changed files with 55 additions and 67 deletions

View File

@@ -60,8 +60,8 @@ bool YGFloatsEqual(const float a, const float b);
float YGFloatMax(const float a, const float b);
YGFloatOptional YGFloatOptionalMax(
const YGFloatOptional& op1,
const YGFloatOptional& op2);
const YGFloatOptional op1,
const YGFloatOptional op2);
float YGFloatMin(const float a, const float b);