diff --git a/src/gfx_layout.cpp b/src/gfx_layout.cpp index a83513977f..91898a4bf6 100644 --- a/src/gfx_layout.cpp +++ b/src/gfx_layout.cpp @@ -389,7 +389,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 cda0ffd2ae..7621d06707 100644 --- a/src/gfx_layout.h +++ b/src/gfx_layout.h @@ -138,7 +138,7 @@ class Layouter : public std::vector