Made the acccessors method to return const references
Summary: Made the acccessors method to return const references Reviewed By: emilsjolander Differential Revision: D7321801 fbshipit-source-id: 9fc4da724bc2f58a0d95824ca3c0b5bf1690bccf
This commit is contained in:
committed by
Facebook Github Bot
parent
cb6e76973d
commit
08743a42e2
@@ -17,12 +17,12 @@ struct YGFloatOptional {
|
||||
// Program will terminate if the value of an undefined is accessed. Please
|
||||
// make sure to check if the optional is defined before calling this function.
|
||||
// To check if float optional is defined, use `isUndefined()`.
|
||||
float getValue() const;
|
||||
const float& getValue() const;
|
||||
|
||||
// Sets the value of float optional, and thus isUndefined is assigned false.
|
||||
void setValue(const float& val);
|
||||
|
||||
bool isUndefined() const;
|
||||
const bool& isUndefined() const;
|
||||
|
||||
bool operator==(const YGFloatOptional& op) const;
|
||||
bool operator!=(const YGFloatOptional& op) const;
|
||||
|
Reference in New Issue
Block a user