summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEvan Martin <martine@danga.com>2012-02-22 23:52:45 (GMT)
committerEvan Martin <martine@danga.com>2012-02-22 23:52:45 (GMT)
commit9e120ac09db575d4223e2554f2f9d392daa1defe (patch)
treea20bdb22f9959f70f7d31b3b66db2fa5c2c811e8
parentbf5ddfcf98baaabd47a0eda02027c24305bbaf62 (diff)
parentf2b03b4a69994361de33fdaaba509b10a299df7f (diff)
downloadNinja-9e120ac09db575d4223e2554f2f9d392daa1defe.zip
Ninja-9e120ac09db575d4223e2554f2f9d392daa1defe.tar.gz
Ninja-9e120ac09db575d4223e2554f2f9d392daa1defe.tar.bz2
Merge pull request #218 from tfarina/fix-graph-todo
Fix the TODO in graph.h.
-rw-r--r--src/build.cc2
-rw-r--r--src/graph.h3
-rw-r--r--src/state_test.cc8
3 files changed, 6 insertions, 7 deletions
diff --git a/src/build.cc b/src/build.cc
index 326c345..c90824d 100644
--- a/src/build.cc
+++ b/src/build.cc
@@ -497,7 +497,7 @@ Builder::~Builder() {
for (vector<Node*>::iterator ni = (*i)->outputs_.begin();
ni != (*i)->outputs_.end(); ++ni)
disk_interface_->RemoveFile((*ni)->path());
- if (!(*i)->rule_->depfile_.empty())
+ if (!(*i)->rule_->depfile().empty())
disk_interface_->RemoveFile((*i)->EvaluateDepFile());
}
}
diff --git a/src/graph.h b/src/graph.h
index 6ba82b9..c83d790 100644
--- a/src/graph.h
+++ b/src/graph.h
@@ -109,8 +109,7 @@ struct Rule {
const EvalString& description() const { return description_; }
const EvalString& depfile() const { return depfile_; }
- // TODO: private:
-
+ private:
// Allow the parsers to reach into this object and fill out its fields.
friend struct ManifestParser;
diff --git a/src/state_test.cc b/src/state_test.cc
index e9d8174..354468b 100644
--- a/src/state_test.cc
+++ b/src/state_test.cc
@@ -23,10 +23,10 @@ TEST(State, Basic) {
State state;
Rule* rule = new Rule("cat");
- rule->command_.AddText("cat ");
- rule->command_.AddSpecial("in");
- rule->command_.AddText(" > ");
- rule->command_.AddSpecial("out");
+ rule->command().AddText("cat ");
+ rule->command().AddSpecial("in");
+ rule->command().AddText(" > ");
+ rule->command().AddSpecial("out");
state.AddRule(rule);
Edge* edge = state.AddEdge(rule);