Skip to content

Commit

Permalink
cleaned up includes based on include-what-you-use
Browse files Browse the repository at this point in the history
  • Loading branch information
firewave committed Feb 14, 2024
1 parent d76cdcf commit f674dde
Show file tree
Hide file tree
Showing 22 changed files with 29 additions and 12 deletions.
2 changes: 2 additions & 0 deletions gui/checkthread.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
#include "suppressions.h"

#include <atomic>
#include <string>
#include <vector>

#include <QList>
#include <QObject>
Expand Down
1 change: 1 addition & 0 deletions gui/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
#include "report.h"
#include "resultsview.h"
#include "scratchpad.h"
#include "settings.h"
#include "showtypes.h"
#include "statsdialog.h"
#include "settingsdialog.h"
Expand Down
3 changes: 2 additions & 1 deletion gui/mainwindow.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@
#define MAINWINDOW_H

#include "library.h"
#include "settings.h"
#include "platforms.h"

#include <QFileDialog>
#include <QMainWindow>
#include <QObject>
#include <QPair>
#include <QString>
#include <QStringList>

Expand All @@ -43,6 +43,7 @@ class ImportProject;
class QCloseEvent;
class QNetworkAccessManager;
class QNetworkReply;
class Settings;
namespace Ui {
class MainWindow;
}
Expand Down
1 change: 1 addition & 0 deletions gui/projectfiledialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@

#include <list>
#include <string>
#include <utility>

#include <QByteArray>
#include <QCheckBox>
Expand Down
3 changes: 3 additions & 0 deletions gui/resultstree.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
#include "common.h"
#include "config.h"
#include "erroritem.h"
#include "errorlogger.h"
#include "errortypes.h"
#include "path.h"
#include "projectfile.h"
Expand All @@ -32,6 +33,8 @@
#include "threadhandler.h"
#include "xmlreportv2.h"

#include <utility>

#include <QAction>
#include <QApplication>
#include <QClipboard>
Expand Down
3 changes: 3 additions & 0 deletions gui/xmlreportv2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,11 @@
#include "cppcheck.h"
#include "erroritem.h"
#include "report.h"
#include "settings.h"
#include "xmlreport.h"

#include <utility>

#include <QDebug>
#include <QDir>
#include <QFile>
Expand Down
1 change: 1 addition & 0 deletions lib/checkbufferoverrun.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
#include <iterator>
#include <numeric> // std::accumulate
#include <sstream>
#include <utility>

#include "xml.h"

Expand Down
4 changes: 0 additions & 4 deletions lib/checkunusedfunctions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,6 @@

#include "xml.h"

namespace CTU {
class FileInfo;
}

//---------------------------------------------------------------------------

// Register this check class
Expand Down
1 change: 1 addition & 0 deletions lib/errorlogger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
#include "color.h"
#include "cppcheck.h"
#include "path.h"
#include "settings.h"
#include "suppressions.h"
#include "token.h"
#include "tokenlist.h"
Expand Down
3 changes: 2 additions & 1 deletion lib/settings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,9 @@
#include "summaries.h"
#include "vfvalue.h"

#include <cctype>
#include <fstream>
#include <sstream>
#include <sstream> // IWYU pragma: keep

#include "json.h"

Expand Down
3 changes: 3 additions & 0 deletions lib/settings.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,15 @@
#include <atomic>
#include <cstddef>
#include <cstdint>
#include <functional>
#include <list>
#include <map>
#include <set>
#include <string>
#include <tuple>
#include <vector>
#include <unordered_set>
#include <utility>

enum class SHOWTIME_MODES;
namespace ValueFlow {
Expand Down
1 change: 1 addition & 0 deletions test/testerrorlogger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@

#include <list>
#include <string>
#include <utility>

#include "xml.h"

Expand Down
1 change: 1 addition & 0 deletions test/testimportproject.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
#include <map>
#include <sstream> // IWYU pragma: keep
#include <string>
#include <utility>
#include <vector>

class TestImporter : public ImportProject {
Expand Down
2 changes: 2 additions & 0 deletions test/testpath.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@
#include "path.h"
#include "fixture.h"
#include "helpers.h"
#include "standards.h"

#include <set>
#include <string>
#include <vector>

Expand Down
1 change: 1 addition & 0 deletions test/testpathmatch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
#include "fixture.h"

#include <string>
#include <utility>
#include <vector>


Expand Down
1 change: 0 additions & 1 deletion test/testprocessexecutor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
#include "helpers.h"
#include "timer.h"

#include <algorithm>
#include <cstdlib>
#include <list>
#include <memory>
Expand Down
3 changes: 3 additions & 0 deletions test/testsettings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@
#include "settings.h"
#include "fixture.h"
#include "helpers.h"
#include "suppressions.h"



class TestSettings : public TestFixture {
public:
Expand Down
1 change: 0 additions & 1 deletion test/testsingleexecutor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
#include "singleexecutor.h"
#include "timer.h"

#include <algorithm>
#include <cstdlib>
#include <list>
#include <memory>
Expand Down
1 change: 0 additions & 1 deletion test/testsuppressions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
#include "threadexecutor.h"
#include "singleexecutor.h"

#include <algorithm>
#include <cstddef>
#include <cstring>
#include <list>
Expand Down
3 changes: 0 additions & 3 deletions test/testsymboldatabase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
#include "errortypes.h"
#include "fixture.h"
#include "helpers.h"
#include "library.h"
#include "platform.h"
#include "settings.h"
#include "sourcelocation.h"
Expand All @@ -34,12 +33,10 @@
#include <iterator>
#include <limits>
#include <list>
#include <map>
#include <set>
#include <sstream>
#include <stdexcept>
#include <string>
#include <unordered_map>
#include <vector>

class TestSymbolDatabase;
Expand Down
1 change: 1 addition & 0 deletions test/testunusedvar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#include "preprocessor.h"
#include "settings.h"
#include "fixture.h"
#include "standards.h"
#include "tokenize.h"

#include <list>
Expand Down
1 change: 1 addition & 0 deletions test/testvarid.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@

#include <sstream> // IWYU pragma: keep
#include <string>
#include <vector>

class TestVarID : public TestFixture {
public:
Expand Down

0 comments on commit f674dde

Please sign in to comment.