Avoid unnecessary allocation of temporaries in layout line cache
This commit is contained in:
@@ -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)];
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user