mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 11:48:10 +00:00
HackStudio: Avoid unnecessary copies in CodeComprehensionEngine
This commit is contained in:
parent
95c21977b4
commit
8b8cd18482
1 changed files with 2 additions and 2 deletions
|
@ -24,8 +24,8 @@ void CodeComprehensionEngine::set_declarations_of_document(const String& filenam
|
|||
return;
|
||||
|
||||
// Optimization - Only notify callback if declarations have changed
|
||||
if (auto previous_declarations = m_all_declarations.get(filename); previous_declarations.has_value()) {
|
||||
if (previous_declarations.value() == declarations)
|
||||
if (auto previous_declarations = m_all_declarations.find(filename); previous_declarations != m_all_declarations.end()) {
|
||||
if (previous_declarations->value == declarations)
|
||||
return;
|
||||
}
|
||||
if (m_store_all_declarations)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue