Avoid unnecessary allocation of temporaries in layout line cache

This commit is contained in:
Jonathan G Rennison
2024-05-30 19:14:01 +01:00
parent 99e6b75337
commit c6c7191b16
2 changed files with 2 additions and 2 deletions

View File

@@ -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)];
}
/**