diff options
author | Robert Iannucci <robbie@rail.com> | 2012-10-03 23:27:27 (GMT) |
---|---|---|
committer | Robert A Iannucci Jr <iannucci@chromium.org> | 2012-11-09 04:25:39 (GMT) |
commit | aca4ec54656057e58ca7a9ae5de7f94c869b2ccb (patch) | |
tree | 4dc557e0df2399092aa6e782f86dae7aa72895a0 /src/state.cc | |
parent | a4220cdcd298cb43133c241497f2edb9e5cbc8d9 (diff) | |
download | Ninja-aca4ec54656057e58ca7a9ae5de7f94c869b2ccb.zip Ninja-aca4ec54656057e58ca7a9ae5de7f94c869b2ccb.tar.gz Ninja-aca4ec54656057e58ca7a9ae5de7f94c869b2ccb.tar.bz2 |
stub out an api and de-constify Pool
Diffstat (limited to 'src/state.cc')
-rw-r--r-- | src/state.cc | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/state.cc b/src/state.cc index 0697e48..e8e6dc3 100644 --- a/src/state.cc +++ b/src/state.cc @@ -22,7 +22,7 @@ #include "metrics.h" #include "util.h" -const Pool State::kDefaultPool("", 0); +Pool State::kDefaultPool("", 0); const Rule State::kPhonyRule("phony"); State::State() { @@ -42,22 +42,22 @@ const Rule* State::LookupRule(const string& rule_name) { return i->second; } -void State::AddPool(const Pool* pool) { +void State::AddPool(Pool* pool) { assert(LookupPool(pool->name()) == NULL); pools_[pool->name()] = pool; } -const Pool* State::LookupPool(const string& pool_name) { - map<string, const Pool*>::iterator i = pools_.find(pool_name); +Pool* State::LookupPool(const string& pool_name) { + map<string, Pool*>::iterator i = pools_.find(pool_name); if (i == pools_.end()) return NULL; return i->second; } -Edge* State::AddEdge(const Rule* rule, const Pool* pool) { - // FIXME(iannucci): do something with pool +Edge* State::AddEdge(const Rule* rule, Pool* pool) { Edge* edge = new Edge(); edge->rule_ = rule; + edge->pool_ = pool; edge->env_ = &bindings_; edges_.push_back(edge); return edge; |