diff options
author | Evan Martin <martine@danga.com> | 2011-09-12 18:44:12 (GMT) |
---|---|---|
committer | Evan Martin <martine@danga.com> | 2011-09-12 18:46:18 (GMT) |
commit | 3fbb25b2cc66f236a39b728d20e5d44da23612ac (patch) | |
tree | d6eb7c1bc63ef3d4d4d1056750756dc581da5ef0 /src/build_log.h | |
parent | f1139aff5deddacd899be064fad9ed5a185e7444 (diff) | |
download | Ninja-3fbb25b2cc66f236a39b728d20e5d44da23612ac.zip Ninja-3fbb25b2cc66f236a39b728d20e5d44da23612ac.tar.gz Ninja-3fbb25b2cc66f236a39b728d20e5d44da23612ac.tar.bz2 |
generalize the pattern of hash_map<const char*, ...>, use in BuildLog
Refactor the code in StatCache for use in BuildLog. Now both use
hash tables where the keys are const char*. Removes another 30ms
from Chrome no-op builds.
Diffstat (limited to 'src/build_log.h')
-rw-r--r-- | src/build_log.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/build_log.h b/src/build_log.h index f45cbde..4a11c1a 100644 --- a/src/build_log.h +++ b/src/build_log.h @@ -19,6 +19,8 @@ #include <string> using namespace std; +#include "hash_map.h" + struct BuildConfig; struct Edge; @@ -64,7 +66,7 @@ struct BuildLog { /// Rewrite the known log entries, throwing away old data. bool Recompact(const string& path, string* err); - typedef map<string, LogEntry*> Log; + typedef ExternalStringHashMap<LogEntry*>::Type Log; Log log_; FILE* log_file_; BuildConfig* config_; |