diff options
author | Sebastian Holtermann <sebholt@xwmw.org> | 2019-03-27 14:50:17 (GMT) |
---|---|---|
committer | Sebastian Holtermann <sebholt@xwmw.org> | 2019-03-27 17:12:43 (GMT) |
commit | 87341d8328c7b3a1d50cfd534ff4cb44334a2561 (patch) | |
tree | 83479c41db2da0c4282565927d60150f5e5ac727 /Source/cmDepends.cxx | |
parent | 5a15c9e7cb63fb5b884271a1184607a8fa87d442 (diff) | |
download | CMake-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/cmDepends.cxx')
-rw-r--r-- | Source/cmDepends.cxx | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Source/cmDepends.cxx b/Source/cmDepends.cxx index 334f1e5..ed76dbf 100644 --- a/Source/cmDepends.cxx +++ b/Source/cmDepends.cxx @@ -61,7 +61,7 @@ bool cmDepends::Finalize(std::ostream& /*unused*/, std::ostream& /*unused*/) bool cmDepends::Check(const std::string& makeFile, const std::string& internalFile, - std::map<std::string, DependencyVector>& validDeps) + DependencyMap& validDeps) { // Check whether dependencies must be regenerated. bool okay = true; @@ -101,9 +101,9 @@ bool cmDepends::WriteDependencies(const std::set<std::string>& /*unused*/, return false; } -bool cmDepends::CheckDependencies( - std::istream& internalDepends, const std::string& internalDependsFileName, - std::map<std::string, DependencyVector>& validDeps) +bool cmDepends::CheckDependencies(std::istream& internalDepends, + const std::string& internalDependsFileName, + DependencyMap& validDeps) { // Read internal depends file time cmFileTime internalDependsTime; @@ -124,7 +124,7 @@ bool cmDepends::CheckDependencies( std::string dependee; cmFileTime dependerTime; cmFileTime dependeeTime; - DependencyVector* currentDependencies = nullptr; + std::vector<std::string>* currentDependencies = nullptr; while (std::getline(internalDepends, line)) { // Check if this an empty or a comment line |