diff --git a/src/gfx_layout_icu.cpp b/src/gfx_layout_icu.cpp index 6a5dcbe1e7..9d3dff5f8e 100644 --- a/src/gfx_layout_icu.cpp +++ b/src/gfx_layout_icu.cpp @@ -104,7 +104,7 @@ private: int partial_offset; public: - ICUParagraphLayout(std::vector &runs, UChar *buff, size_t buff_length) : runs(runs), buff(buff), buff_length(buff_length) + ICUParagraphLayout(std::vector &&runs, UChar *buff, size_t buff_length) : runs(std::move(runs)), buff(buff), buff_length(buff_length) { this->Reflow(); } @@ -374,7 +374,7 @@ std::vector ItemizeStyle(std::vector &runs_current, FontMap &fon run.Shape(buff, length); } - return new ICUParagraphLayout(runs, buff, length); + return new ICUParagraphLayout(std::move(runs), buff, length); } /* static */ std::unique_ptr ICUParagraphLayoutFactory::break_iterator; diff --git a/src/os/windows/string_uniscribe.cpp b/src/os/windows/string_uniscribe.cpp index 7a4c0244d2..a3d92c52d6 100644 --- a/src/os/windows/string_uniscribe.cpp +++ b/src/os/windows/string_uniscribe.cpp @@ -113,7 +113,7 @@ public: } }; - UniscribeParagraphLayout(std::vector &ranges, const UniscribeParagraphLayoutFactory::CharType *buffer) : text_buffer(buffer), ranges(ranges) + UniscribeParagraphLayout(std::vector &&ranges, const UniscribeParagraphLayoutFactory::CharType *buffer) : text_buffer(buffer), ranges(std::move(ranges)) { this->Reflow(); } @@ -315,7 +315,7 @@ static std::vector UniscribeItemizeString(UniscribeParagraphLayoutF } } - return new UniscribeParagraphLayout(ranges, buff); + return new UniscribeParagraphLayout(std::move(ranges), buff); } /* virtual */ std::unique_ptr UniscribeParagraphLayout::NextLine(int max_width)