Codechange: Avoid unnecessary allocation of temporaries in layout line cache (#12737)
This commit is contained in:
committed by
GitHub
parent
d7eb29d292
commit
af7ad964dd
+1
-1
@@ -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)];
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user