#ifndef NINJA_EVAL_ENV_H_
#define NINJA_EVAL_ENV_H_
+#include <map>
+using namespace std;
+
// A scope for variable lookups.
struct Env {
virtual string LookupVariable(const string& var) = 0;
--- /dev/null
+#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());
+ }
+};
+}
#define NINJA_NINJA_H_
#include <algorithm>
-#include <map>
#include <queue>
#include <set>
#include <string>
using namespace std;
#include "eval_env.h"
+#include "hash_map.h"
int ReadFile(const string& path, string* contents, string* err);
};
struct StatCache {
- typedef map<string, FileStat*> Paths;
+ typedef hash_map<string, FileStat*> Paths;
Paths paths_;
FileStat* GetFile(const string& path);
void Dump();