From 019da2777864a796f2d35cba070b43c29552e1d1 Mon Sep 17 00:00:00 2001 From: Jason Simmons Date: Thu, 21 Jan 2021 12:44:25 -0800 Subject: [PATCH] Use references when iterating over SkParagraph text boxes --- third_party/txt/src/skia/paragraph_skia.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/third_party/txt/src/skia/paragraph_skia.cc b/third_party/txt/src/skia/paragraph_skia.cc index 228702875b74e..4831f8456d7db 100644 --- a/third_party/txt/src/skia/paragraph_skia.cc +++ b/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)); }