|
56 | 56 | #include <algorithm> |
57 | 57 | #include <iterator> |
58 | 58 | #include <list> |
| 59 | +#include <memory> |
59 | 60 | #include <set> |
60 | 61 | #include <string> |
61 | 62 | #include <unordered_set> |
@@ -542,8 +543,8 @@ void MainWindow::saveSettings() const |
542 | 543 | void MainWindow::doAnalyzeProject(ImportProject p, const bool checkLibrary, const bool checkConfiguration) |
543 | 544 | { |
544 | 545 | Settings checkSettings; |
545 | | - Suppressions supprs; |
546 | | - if (!getCppcheckSettings(checkSettings, supprs)) |
| 546 | + auto supprs = std::make_shared<Suppressions>(); |
| 547 | + if (!getCppcheckSettings(checkSettings, *supprs)) |
547 | 548 | return; |
548 | 549 |
|
549 | 550 | clearResults(); |
@@ -613,8 +614,8 @@ void MainWindow::doAnalyzeFiles(const QStringList &files, const bool checkLibrar |
613 | 614 | return; |
614 | 615 |
|
615 | 616 | Settings checkSettings; |
616 | | - Suppressions supprs; |
617 | | - if (!getCppcheckSettings(checkSettings, supprs)) |
| 617 | + auto supprs = std::make_shared<Suppressions>(); |
| 618 | + if (!getCppcheckSettings(checkSettings, *supprs)) |
618 | 619 | return; |
619 | 620 |
|
620 | 621 | clearResults(); |
@@ -1348,8 +1349,8 @@ void MainWindow::reAnalyzeSelected(const QStringList& files) |
1348 | 1349 | } |
1349 | 1350 |
|
1350 | 1351 | Settings checkSettings; |
1351 | | - Suppressions supprs; |
1352 | | - if (!getCppcheckSettings(checkSettings, supprs)) |
| 1352 | + auto supprs = std::make_shared<Suppressions>(); |
| 1353 | + if (!getCppcheckSettings(checkSettings, *supprs)) |
1353 | 1354 | return; |
1354 | 1355 |
|
1355 | 1356 | // Clear details, statistics and progress |
@@ -1383,8 +1384,8 @@ void MainWindow::reAnalyze(bool all) |
1383 | 1384 | return; |
1384 | 1385 |
|
1385 | 1386 | Settings checkSettings; |
1386 | | - Suppressions supprs; |
1387 | | - if (!getCppcheckSettings(checkSettings, supprs)) |
| 1387 | + auto supprs = std::make_shared<Suppressions>(); |
| 1388 | + if (!getCppcheckSettings(checkSettings, *supprs)) |
1388 | 1389 | return; |
1389 | 1390 |
|
1390 | 1391 | // Clear details, statistics and progress |
|
0 commit comments