diff options
author | Evan Martin <martine@danga.com> | 2012-01-09 21:30:09 (GMT) |
---|---|---|
committer | Evan Martin <martine@danga.com> | 2012-01-09 21:30:09 (GMT) |
commit | fc36ba5f04f659f485e4ae9d70ad826b5838959d (patch) | |
tree | af6a1251d687dc8518a3cbefade2070fe4e1db31 /src/state.cc | |
parent | bef0bbfb3e6b0fcb71f13fea07fe14d628fb6492 (diff) | |
download | Ninja-fc36ba5f04f659f485e4ae9d70ad826b5838959d.zip Ninja-fc36ba5f04f659f485e4ae9d70ad826b5838959d.tar.gz Ninja-fc36ba5f04f659f485e4ae9d70ad826b5838959d.tar.bz2 |
switch node lookup to StringPiece
Diffstat (limited to 'src/state.cc')
-rw-r--r-- | src/state.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/state.cc b/src/state.cc index 238674e..7e3aae8 100644 --- a/src/state.cc +++ b/src/state.cc @@ -47,16 +47,16 @@ Edge* State::AddEdge(const Rule* rule) { return edge; } -Node* State::GetNode(const string& path) { +Node* State::GetNode(StringPiece path) { Node* node = LookupNode(path); if (node) return node; - node = new Node(path); + node = new Node(path.AsString()); paths_[node->path()] = node; return node; } -Node* State::LookupNode(const string& path) { +Node* State::LookupNode(StringPiece path) { Paths::iterator i = paths_.find(path); if (i != paths_.end()) return i->second; |