Make ==
operator for YGStyle
free function
Summary: @public Makes it work nicely with gtest. Also allows rhs *and* lhs to offer `operator(YGStyle)()`. Reviewed By: SidharthGuglani Differential Revision: D13942573 fbshipit-source-id: ff8b3a9aa6f05ca1b0572eb97d0ad23b09d77871
This commit is contained in:
committed by
Facebook Github Bot
parent
9378a7a439
commit
3645f43cea
@@ -66,10 +66,10 @@ public:
|
||||
flexWrap(YGWrapNoWrap),
|
||||
overflow(YGOverflowVisible),
|
||||
display(YGDisplayFlex) {}
|
||||
bool operator==(const YGStyle& style);
|
||||
|
||||
bool operator!=(YGStyle style) {
|
||||
return !(*this == style);
|
||||
}
|
||||
~YGStyle() = default;
|
||||
};
|
||||
|
||||
bool operator==(const YGStyle& lhs, const YGStyle& rhs);
|
||||
inline bool operator!=(const YGStyle& lhs, const YGStyle& rhs) {
|
||||
return !(lhs == rhs);
|
||||
}
|
||||
|
Reference in New Issue
Block a user