diff options
author | Evan Martin <martine@danga.com> | 2010-12-17 23:00:47 (GMT) |
---|---|---|
committer | Evan Martin <martine@danga.com> | 2010-12-17 23:00:47 (GMT) |
commit | b0f931f18d4ce98ebbc712d0caa8368b68137028 (patch) | |
tree | e9d5fc494309b61198745364f54eb7467325a609 /src/hash_map.h | |
parent | cd5dd9e74df2accca52c85cbb1c0e7075660919e (diff) | |
download | Ninja-b0f931f18d4ce98ebbc712d0caa8368b68137028.zip Ninja-b0f931f18d4ce98ebbc712d0caa8368b68137028.tar.gz Ninja-b0f931f18d4ce98ebbc712d0caa8368b68137028.tar.bz2 |
use hash_map for paths; much faster builds
Diffstat (limited to 'src/hash_map.h')
-rw-r--r-- | src/hash_map.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/hash_map.h b/src/hash_map.h new file mode 100644 index 0000000..820f773 --- /dev/null +++ b/src/hash_map.h @@ -0,0 +1,12 @@ +#include <ext/hash_map> + +using __gnu_cxx::hash_map; + +namespace __gnu_cxx { +template<> +struct hash<std::string> { + size_t operator()(const std::string& s) const { + return hash<const char*>()(s.c_str()); + } +}; +} |