diff options
author | Sebastian Holtermann <sebholt@xwmw.org> | 2019-05-10 09:22:38 (GMT) |
---|---|---|
committer | Sebastian Holtermann <sebholt@xwmw.org> | 2019-05-10 18:22:26 (GMT) |
commit | 02293841e742c14a18155bc0e10c39462c97dcbf (patch) | |
tree | 770fb507ae356ce086ef5eb37df0ab88058165d9 /Source/cmGlobalNinjaGenerator.h | |
parent | a173a1173e06dad812afe17c9751cb7c2f94eda4 (diff) | |
download | CMake-02293841e742c14a18155bc0e10c39462c97dcbf.zip CMake-02293841e742c14a18155bc0e10c39462c97dcbf.tar.gz CMake-02293841e742c14a18155bc0e10c39462c97dcbf.tar.bz2 |
Ninja: Simplify cmGlobalNinjaGenerator::AddRule and HasRule methods
- Use `std::unordered_set` for the emitted rule register
- Use `std::unordered_map` for command length register
Diffstat (limited to 'Source/cmGlobalNinjaGenerator.h')
-rw-r--r-- | Source/cmGlobalNinjaGenerator.h | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/Source/cmGlobalNinjaGenerator.h b/Source/cmGlobalNinjaGenerator.h index efd1d8f..4cd1a98 100644 --- a/Source/cmGlobalNinjaGenerator.h +++ b/Source/cmGlobalNinjaGenerator.h @@ -10,6 +10,7 @@ #include <set> #include <string> #include <unordered_map> +#include <unordered_set> #include <utility> #include <vector> @@ -415,15 +416,11 @@ private: cmGeneratedFileStream* RulesFileStream; cmGeneratedFileStream* CompileCommandsStream; - /// The type used to store the set of rules added to the generated build - /// system. - typedef std::set<std::string> RulesSetType; - /// The set of rules added to the generated build system. - RulesSetType Rules; + std::unordered_set<std::string> Rules; /// Length of rule command, used by rsp file evaluation - std::map<std::string, int> RuleCmdLength; + std::unordered_map<std::string, int> RuleCmdLength; /// The set of dependencies to add to the "all" target. cmNinjaDeps AllDependencies; |