diff options
author | Evan Martin <martine@danga.com> | 2011-12-07 17:35:02 (GMT) |
---|---|---|
committer | Evan Martin <martine@danga.com> | 2011-12-07 17:35:02 (GMT) |
commit | 48526b9c08f22ddcf7e36ca02fde0202312920fa (patch) | |
tree | e9c0890d2e5cb27b90ce117945d4babb069bac0e /src/ninja.cc | |
parent | d27d21a8c38debfd69c1deaa302cdb500511e0af (diff) | |
download | Ninja-48526b9c08f22ddcf7e36ca02fde0202312920fa.zip Ninja-48526b9c08f22ddcf7e36ca02fde0202312920fa.tar.gz Ninja-48526b9c08f22ddcf7e36ca02fde0202312920fa.tar.bz2 |
make Node::in_edge_ private
Diffstat (limited to 'src/ninja.cc')
-rw-r--r-- | src/ninja.cc | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/ninja.cc b/src/ninja.cc index f0525fb..1024401 100644 --- a/src/ninja.cc +++ b/src/ninja.cc @@ -203,10 +203,10 @@ int CmdQuery(State* state, int argc, char* argv[]) { Node* node = state->LookupNode(argv[i]); if (node) { printf("%s:\n", argv[i]); - if (node->in_edge_) { - printf(" input: %s\n", node->in_edge_->rule_->name_.c_str()); - for (vector<Node*>::iterator in = node->in_edge_->inputs_.begin(); - in != node->in_edge_->inputs_.end(); ++in) { + if (node->in_edge()) { + printf(" input: %s\n", node->in_edge()->rule_->name_.c_str()); + for (vector<Node*>::iterator in = node->in_edge()->inputs_.begin(); + in != node->in_edge()->inputs_.end(); ++in) { printf(" %s\n", (*in)->path().c_str()); } } @@ -258,10 +258,10 @@ int CmdTargetsList(const vector<Node*>& nodes, int depth, int indent) { for (int i = 0; i < indent; ++i) printf(" "); const char* target = (*n)->path().c_str(); - if ((*n)->in_edge_) { - printf("%s: %s\n", target, (*n)->in_edge_->rule_->name_.c_str()); + if ((*n)->in_edge()) { + printf("%s: %s\n", target, (*n)->in_edge()->rule_->name_.c_str()); if (depth > 1 || depth <= 0) - CmdTargetsList((*n)->in_edge_->inputs_, depth - 1, indent + 1); + CmdTargetsList((*n)->in_edge()->inputs_, depth - 1, indent + 1); } else { printf("%s\n", target); } @@ -280,7 +280,7 @@ int CmdTargetsSourceList(State* state) { for (vector<Node*>::iterator inps = (*e)->inputs_.begin(); inps != (*e)->inputs_.end(); ++inps) - if (!(*inps)->in_edge_) + if (!(*inps)->in_edge()) printf("%s\n", (*inps)->path().c_str()); return 0; } @@ -383,7 +383,7 @@ void PrintCommands(Edge* edge, set<Edge*>* seen) { for (vector<Node*>::iterator in = edge->inputs_.begin(); in != edge->inputs_.end(); ++in) - PrintCommands((*in)->in_edge_, seen); + PrintCommands((*in)->in_edge(), seen); if (!edge->is_phony()) puts(edge->EvaluateCommand().c_str()); @@ -399,7 +399,7 @@ int CmdCommands(State* state, int argc, char* argv[]) { set<Edge*> seen; for (vector<Node*>::iterator in = nodes.begin(); in != nodes.end(); ++in) - PrintCommands((*in)->in_edge_, &seen); + PrintCommands((*in)->in_edge(), &seen); return 0; } |