From 7d2b84aab6c2b8b56b19586a72d95e60af6cdd87 Mon Sep 17 00:00:00 2001 From: Jonathan Dann Date: Wed, 21 Mar 2018 16:05:10 -0700 Subject: [PATCH] Pass some constructor argumetns by const-reference Summary: These don't need to be copied twice. Reviewed By: priteshrnandgaonkar Differential Revision: D7291363 fbshipit-source-id: 22e606d0b3fa1133d7e0334c8cf9f5f1f32fe64b --- yoga/YGNode.cpp | 4 ++-- yoga/YGNode.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/yoga/YGNode.cpp b/yoga/YGNode.cpp index 7a71058a..37b63042 100644 --- a/yoga/YGNode.cpp +++ b/yoga/YGNode.cpp @@ -423,10 +423,10 @@ YGNode::YGNode( YGBaselineFunc baseline, YGDirtiedFunc dirtied, YGStyle style, - YGLayout layout, + const YGLayout& layout, uint32_t lineIndex, YGNodeRef parent, - YGVector children, + const YGVector& children, YGNodeRef nextChild, YGConfigRef config, bool isDirty, diff --git a/yoga/YGNode.h b/yoga/YGNode.h index 081bc235..c9c5599c 100644 --- a/yoga/YGNode.h +++ b/yoga/YGNode.h @@ -47,10 +47,10 @@ struct YGNode { YGBaselineFunc baseline, YGDirtiedFunc dirtied, YGStyle style, - YGLayout layout, + const YGLayout& layout, uint32_t lineIndex, YGNodeRef parent, - YGVector children, + const YGVector& children, YGNodeRef nextChild, YGConfigRef config, bool isDirty,