Changeset View
Changeset View
Standalone View
Standalone View
lib/checks/dependenciescheck.cpp
Show First 20 Lines • Show All 41 Lines • ▼ Show 20 Line(s) | 35 | for (int i = 0; i < fileSet->size(); ++i) { | |||
---|---|---|---|---|---|
42 | else | 42 | else | ||
43 | fileIndex.insert(file->fileName().toUtf8(), i); | 43 | fileIndex.insert(file->fileName().toUtf8(), i); | ||
44 | } | 44 | } | ||
45 | 45 | | |||
46 | UnusedDependencies unusedDeps; | 46 | UnusedDependencies unusedDeps; | ||
47 | for (int i = 0; i < fileSet->size(); ++i) { | 47 | for (int i = 0; i < fileSet->size(); ++i) { | ||
48 | if (i != fileToCheck && fileToCheck >= 0) | 48 | if (i != fileToCheck && fileToCheck >= 0) | ||
49 | continue; | 49 | continue; | ||
50 | const auto *dynamicSection = fileSet->file(i)->dynamicSection(); | ||||
mwolff: the preferred style is
const auto *dynamicSection = fileSet->file(i)->dynamicSection()… | |||||
51 | if (!dynamicSection) | ||||
52 | continue; | ||||
50 | foreach (const auto &needed, fileSet->file(i)->dynamicSection()->neededLibraries()) { | 53 | foreach (const auto &needed, fileSet->file(i)->dynamicSection()->neededLibraries()) { | ||
51 | const auto depIdx = fileIndex.value(needed); | 54 | const auto depIdx = fileIndex.value(needed); | ||
52 | const auto depFile = fileSet->file(depIdx); | 55 | const auto depFile = fileSet->file(depIdx); | ||
53 | const auto count = usedSymbolCount(fileSet->file(i), depFile); | 56 | const auto count = usedSymbolCount(fileSet->file(i), depFile); | ||
54 | if (count == 0) | 57 | if (count == 0) | ||
55 | unusedDeps.push_back(qMakePair(i, depIdx)); | 58 | unusedDeps.push_back(qMakePair(i, depIdx)); | ||
56 | } | 59 | } | ||
57 | } | 60 | } | ||
▲ Show 20 Lines • Show All 58 Lines • Show Last 20 Lines |
the preferred style is