Codechange: Avoid unnecessary allocation of temporaries in layout line cache (#12737)

This commit is contained in:
Jonathan G Rennison
2024-06-08 21:21:02 +01:00
committed by GitHub
parent d7eb29d292
commit af7ad964dd
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -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)];
}
/**