CompactValue overrides of YGResolveValue/YGValueEqual

Summary:
@public

I would like to get rid of implicit conversions between `YGValue` and `CompactValue`, because they don’t come for free.

That’s why I am adding `CompactValue` specific overrides for `YGResolveValue` and  `YGValueEqual`, that do explicit casts. Up the commit stack, we will be able mark both `CompactValue(const YGValue&)` and `CompactValue::operator YGValue()` as `explicit`.

Reviewed By: SidharthGuglani

Differential Revision: D14598447

fbshipit-source-id: 75dc15cefb2dddcf8def891c5fb37893cacd9d46
This commit is contained in:
David Aurelio
2019-03-26 05:17:50 -07:00
committed by Facebook Github Bot
parent e4856a2264
commit 3d2836a947
5 changed files with 15 additions and 3 deletions

View File

@@ -5,6 +5,7 @@
* file in the root directory of this source tree.
*/
#include "YGStyle.h"
#include "Utils.h"
// Yoga specific properties, not compatible with flexbox specification
bool operator==(const YGStyle& lhs, const YGStyle& rhs) {