summaryrefslogtreecommitdiffstats
path: root/Source/cmDependsC.h
diff options
context:
space:
mode:
authorSebastian Holtermann <sebholt@xwmw.org>2019-03-27 14:50:17 (GMT)
committerSebastian Holtermann <sebholt@xwmw.org>2019-03-27 17:12:43 (GMT)
commit87341d8328c7b3a1d50cfd534ff4cb44334a2561 (patch)
tree83479c41db2da0c4282565927d60150f5e5ac727 /Source/cmDependsC.h
parent5a15c9e7cb63fb5b884271a1184607a8fa87d442 (diff)
downloadCMake-87341d8328c7b3a1d50cfd534ff4cb44334a2561.zip
CMake-87341d8328c7b3a1d50cfd534ff4cb44334a2561.tar.gz
CMake-87341d8328c7b3a1d50cfd534ff4cb44334a2561.tar.bz2
cmDepends: Define DependencyMap instead of DependencyVector
In `cmDepends` use `typedef std::map<std::string, std::vector<std::string>> DependencyMap` instead of defining a `class DependencyVector : public std::vector<std::string>` and using it in `std::map<std::string, DependencyVector>`. Since `std::map<std::string, std::vector<std::string>>` is used in various other places, we now reuse all of it's auto generated methods. This doesn't happen when we use `DependencyVector` in a `std::map`, because it is a different class than `std::vector<std::string>`.
Diffstat (limited to 'Source/cmDependsC.h')
-rw-r--r--Source/cmDependsC.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/Source/cmDependsC.h b/Source/cmDependsC.h
index eee5ae1..3fc839e 100644
--- a/Source/cmDependsC.h
+++ b/Source/cmDependsC.h
@@ -27,8 +27,7 @@ public:
relative path from the build directory to the target file. */
cmDependsC();
cmDependsC(cmLocalGenerator* lg, const std::string& targetDir,
- const std::string& lang,
- const std::map<std::string, DependencyVector>* validDeps);
+ const std::string& lang, const DependencyMap* validDeps);
/** Virtual destructor to cleanup subclasses properly. */
~cmDependsC() override;
@@ -81,7 +80,7 @@ public:
};
protected:
- const std::map<std::string, DependencyVector>* ValidDeps = nullptr;
+ const DependencyMap* ValidDeps = nullptr;
std::set<std::string> Encountered;
std::queue<UnscannedEntry> Unscanned;