From 6132a597725522b752bb576e9feb18cff0720632 Mon Sep 17 00:00:00 2001 From: David Aurelio Date: Fri, 17 Aug 2018 03:56:35 -0700 Subject: [PATCH] Type alias for dimensions Summary: Aliases `std::array` as `YGStyle::Dimensions` for increased readability. This prepares a follow up, where the alias is used in `Yoga.cpp`. Reviewed By: astreet Differential Revision: D8874566 fbshipit-source-id: a7a7a1b02bff547d7d6b800c522c4785a62ad611 --- yoga/YGStyle.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/yoga/YGStyle.h b/yoga/YGStyle.h index 3f4bbd34..83c24968 100644 --- a/yoga/YGStyle.h +++ b/yoga/YGStyle.h @@ -11,6 +11,8 @@ #include "Yoga.h" struct YGStyle { + using Dimensions = std::array; + YGDirection direction; YGFlexDirection flexDirection; YGJustify justifyContent; @@ -29,9 +31,9 @@ struct YGStyle { std::array position; std::array padding; std::array border; - std::array dimensions; - std::array minDimensions; - std::array maxDimensions; + Dimensions dimensions; + Dimensions minDimensions; + Dimensions maxDimensions; // Yoga specific properties, not compatible with flexbox specification YGFloatOptional aspectRatio;