Remove cast from detail::Values
to std::array<YGValue
Summary: @public When switching to `CompactValue`, casting edges or dimensions to `std::array<YGValue, ...>` will do actual work. In order to avoid that from happening implicitely, we remove the casting operator. Reviewed By: SidharthGuglani Differential Revision: D13464292 fbshipit-source-id: 217065b001a63cfa8adde715063682c583007a4d
This commit is contained in:
committed by
Facebook Github Bot
parent
3df41aefdb
commit
8461aeaef0
@@ -20,7 +20,8 @@ static void indent(string& base, uint32_t level) {
|
||||
}
|
||||
}
|
||||
|
||||
static bool areFourValuesEqual(const std::array<YGValue, YGEdgeCount>& four) {
|
||||
static bool areFourValuesEqual(
|
||||
const facebook::yoga::detail::Values<YGEdgeCount>& four) {
|
||||
return YGValueEqual(four[0], four[1]) && YGValueEqual(four[0], four[2]) &&
|
||||
YGValueEqual(four[0], four[3]);
|
||||
}
|
||||
@@ -81,7 +82,7 @@ appendNumberIfNotZero(string& base, const string& str, const YGValue number) {
|
||||
static void appendEdges(
|
||||
string& base,
|
||||
const string& key,
|
||||
const std::array<YGValue, YGEdgeCount>& edges) {
|
||||
const facebook::yoga::detail::Values<YGEdgeCount>& edges) {
|
||||
if (areFourValuesEqual(edges)) {
|
||||
appendNumberIfNotZero(base, key, edges[YGEdgeLeft]);
|
||||
} else {
|
||||
@@ -95,7 +96,7 @@ static void appendEdges(
|
||||
static void appendEdgeIfNotUndefined(
|
||||
string& base,
|
||||
const string& str,
|
||||
const std::array<YGValue, YGEdgeCount>& edges,
|
||||
const facebook::yoga::detail::Values<YGEdgeCount>& edges,
|
||||
const YGEdge edge) {
|
||||
appendNumberIfNotUndefined(
|
||||
base, str, *YGComputedEdgeValue(edges, edge, &YGValueUndefined));
|
||||
|
Reference in New Issue
Block a user