From a66daa9ac0d7267eccac85b7d047b7912a3f40c3 Mon Sep 17 00:00:00 2001 From: malte_langkabel Date: Wed, 28 Jun 2017 17:50:51 +0200 Subject: [PATCH] build: reduce boost includes in FilePath.h --- src/lib/data/indexer/IndexerCommand.cpp | 8 ++++---- src/lib/data/indexer/TaskBuildIndex.cpp | 2 +- src/lib/data/location/SourceLocationFile.h | 1 + src/lib/utility/file/FilePath.cpp | 2 ++ src/lib/utility/file/FilePath.h | 2 +- src/lib_gui/qt/window/project_wizzard/QtProjectWizzard.h | 2 ++ 6 files changed, 11 insertions(+), 6 deletions(-) diff --git a/src/lib/data/indexer/IndexerCommand.cpp b/src/lib/data/indexer/IndexerCommand.cpp index 9c9d5a59..354c002c 100644 --- a/src/lib/data/indexer/IndexerCommand.cpp +++ b/src/lib/data/indexer/IndexerCommand.cpp @@ -17,14 +17,14 @@ size_t IndexerCommand::getByteSize() const { size_t size = m_sourceFilePath.str().size(); - for (auto i : m_indexedPaths) + for (const FilePath& path: m_indexedPaths) { - size += sizeof(std::string) + i.str().size(); + size += sizeof(std::string) + path.str().size(); } - for (auto i : m_excludedPaths) + for (const FilePath& path : m_excludedPaths) { - size += sizeof(std::string) + i.str().size(); + size += sizeof(std::string) + path.str().size(); } return size; diff --git a/src/lib/data/indexer/TaskBuildIndex.cpp b/src/lib/data/indexer/TaskBuildIndex.cpp index 7dfab81b..abc2b86e 100644 --- a/src/lib/data/indexer/TaskBuildIndex.cpp +++ b/src/lib/data/indexer/TaskBuildIndex.cpp @@ -139,7 +139,7 @@ void TaskBuildIndex::doExit(std::shared_ptr blackboard) if (crashedFiles.size()) { std::shared_ptr is = std::make_shared(); - for (auto path : crashedFiles) + for (const FilePath& path : crashedFiles) { is->addError("The translation unit threw an exception during indexing. Please check if the source file " "conforms to the specified language standard and all necessary options are defined within your project " diff --git a/src/lib/data/location/SourceLocationFile.h b/src/lib/data/location/SourceLocationFile.h index 1bbd6c58..c967aa0a 100644 --- a/src/lib/data/location/SourceLocationFile.h +++ b/src/lib/data/location/SourceLocationFile.h @@ -1,6 +1,7 @@ #ifndef SOURCE_LOCATION_FILE_H #define SOURCE_LOCATION_FILE_H +#include #include #include #include diff --git a/src/lib/utility/file/FilePath.cpp b/src/lib/utility/file/FilePath.cpp index b59e29e9..2f0ee8fe 100644 --- a/src/lib/utility/file/FilePath.cpp +++ b/src/lib/utility/file/FilePath.cpp @@ -2,6 +2,8 @@ #include +#include "boost/filesystem.hpp" + #include "utility/logging/logging.h" #include "utility/utilityString.h" diff --git a/src/lib/utility/file/FilePath.h b/src/lib/utility/file/FilePath.h index da3aa245..8abbf2b5 100644 --- a/src/lib/utility/file/FilePath.h +++ b/src/lib/utility/file/FilePath.h @@ -4,7 +4,7 @@ #include #include -#include "boost/filesystem.hpp" +#include "boost/filesystem/path.hpp" class FilePath { diff --git a/src/lib_gui/qt/window/project_wizzard/QtProjectWizzard.h b/src/lib_gui/qt/window/project_wizzard/QtProjectWizzard.h index f5663ef7..5a33e6de 100644 --- a/src/lib_gui/qt/window/project_wizzard/QtProjectWizzard.h +++ b/src/lib_gui/qt/window/project_wizzard/QtProjectWizzard.h @@ -1,6 +1,8 @@ #ifndef QT_PROJECT_WIZZARD_H #define QT_PROJECT_WIZZARD_H +#include + #include #include "qt/window/project_wizzard/QtProjectWizzardWindow.h"