From df9f01605baf9b75fdca397f4be8d2b519235b76 Mon Sep 17 00:00:00 2001 From: Dmitry Ivakhnenko Date: Wed, 7 Dec 2022 13:32:18 +0300 Subject: [PATCH] return value from getGap method --- javascript/sources/Node.cc | 4 ++-- javascript/sources/Node.hh | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/javascript/sources/Node.cc b/javascript/sources/Node.cc index 7c71091af8..cdc63e7773 100644 --- a/javascript/sources/Node.cc +++ b/javascript/sources/Node.cc @@ -331,8 +331,8 @@ Value Node::getPadding(int edge) const { YGNodeStyleGetPadding(m_node, static_cast(edge))); } -float Node::getGap(int gutter) { - return YGNodeStyleGetGap(m_node, static_cast(gutter)); +Value Node::getGap(int gutter) { + return Value(static_cast(YGUnitPercent), YGNodeStyleGetGap(m_node, static_cast(gutter))); } bool Node::isReferenceBaseline() { diff --git a/javascript/sources/Node.hh b/javascript/sources/Node.hh index d277b1f043..072a979de0 100644 --- a/javascript/sources/Node.hh +++ b/javascript/sources/Node.hh @@ -158,7 +158,7 @@ public: // Style getters Value getPadding(int edge) const; - float getGap(int gutter); + Value getGap(int gutter); public: // Tree hierarchy mutators void insertChild(Node* child, unsigned index);