From 43a836fd96e6a0443fada00d484fed2390845a5a Mon Sep 17 00:00:00 2001 From: Jason Simmons Date: Thu, 21 Jan 2021 14:24:12 -0800 Subject: [PATCH] Use references when iterating over SkParagraph text boxes (flutter/engine#23837) --- engine/src/flutter/third_party/txt/src/skia/paragraph_skia.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/engine/src/flutter/third_party/txt/src/skia/paragraph_skia.cc b/engine/src/flutter/third_party/txt/src/skia/paragraph_skia.cc index 228702875b..4831f8456d 100644 --- a/engine/src/flutter/third_party/txt/src/skia/paragraph_skia.cc +++ b/engine/src/flutter/third_party/txt/src/skia/paragraph_skia.cc @@ -171,7 +171,7 @@ std::vector ParagraphSkia::GetRectsForRange( static_cast(rect_width_style)); std::vector boxes; - for (const skt::TextBox skia_box : skia_boxes) { + for (const skt::TextBox& skia_box : skia_boxes) { boxes.emplace_back(skia_box.rect, static_cast(skia_box.direction)); } @@ -183,7 +183,7 @@ std::vector ParagraphSkia::GetRectsForPlaceholders() { std::vector skia_boxes = paragraph_->getRectsForPlaceholders(); std::vector boxes; - for (const skt::TextBox skia_box : skia_boxes) { + for (const skt::TextBox& skia_box : skia_boxes) { boxes.emplace_back(skia_box.rect, static_cast(skia_box.direction)); }