Commit 6cae00af authored by Igor Kushnir's avatar Igor Kushnir

ParseProjectJob: QSet::find => QSet::constFind

This prevents unnecessary detaching.

GIT_SILENT
parent 5490b12c
......@@ -150,8 +150,8 @@ void ParseProjectJob::queueFilesToParse()
if (auto currentDocument = ICore::self()->documentController()->activeDocument()) {
const auto path = IndexedString(currentDocument->url());
auto fileIt = d->filesToParse.find(path);
if (fileIt != d->filesToParse.end()) {
const auto fileIt = d->filesToParse.constFind(path);
if (fileIt != d->filesToParse.cend()) {
ICore::self()->languageController()->backgroundParser()->addDocument(path,
TopDUContext::AllDeclarationsContextsAndUses, BackgroundParser::BestPriority,
this);
......@@ -163,8 +163,8 @@ void ParseProjectJob::queueFilesToParse()
const auto documents = ICore::self()->documentController()->openDocuments();
for (auto* document : documents) {
const auto path = IndexedString(document->url());
auto fileIt = d->filesToParse.find(path);
if (fileIt != d->filesToParse.end()) {
const auto fileIt = d->filesToParse.constFind(path);
if (fileIt != d->filesToParse.cend()) {
ICore::self()->languageController()->backgroundParser()->addDocument(path,
TopDUContext::AllDeclarationsContextsAndUses, 10,
this);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment