Replaced default constructors with member assignments
Reviewed By: davidaurelio Differential Revision: D10466125 fbshipit-source-id: ed92d1e054a8b5b9a6c8c09035173b11da45c368
This commit is contained in:
committed by
Facebook Github Bot
parent
ba9bd4eae3
commit
fad2ee1a64
@@ -9,12 +9,12 @@
|
||||
|
||||
struct YGFloatOptional {
|
||||
private:
|
||||
float value_;
|
||||
bool isUndefined_;
|
||||
float value_ = 0;
|
||||
bool isUndefined_ = true;
|
||||
|
||||
public:
|
||||
explicit YGFloatOptional(float value);
|
||||
explicit YGFloatOptional() : value_(0), isUndefined_(true) {}
|
||||
YGFloatOptional() = default;
|
||||
|
||||
// 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.
|
||||
|
Reference in New Issue
Block a user