diff --git a/src/gfx_layout.cpp b/src/gfx_layout.cpp index 392ba1fa4a..fbdfe10ec2 100644 --- a/src/gfx_layout.cpp +++ b/src/gfx_layout.cpp @@ -388,7 +388,7 @@ Layouter::LineCacheItem &Layouter::GetCachedParagraphLayout(std::string_view str LineCacheKey key; key.state_before = state; key.str.assign(str); - return (*linecache)[key]; + return (*linecache)[std::move(key)]; } /** diff --git a/src/gfx_layout.h b/src/gfx_layout.h index 42b809f561..f635d80dc3 100644 --- a/src/gfx_layout.h +++ b/src/gfx_layout.h @@ -132,7 +132,7 @@ class Layouter : public std::vector