summaryrefslogtreecommitdiffstats
path: root/src/build_log.cc
diff options
context:
space:
mode:
authorEvan Martin <martine@danga.com>2012-01-09 20:54:31 (GMT)
committerEvan Martin <martine@danga.com>2012-01-09 21:03:21 (GMT)
commitbef0bbfb3e6b0fcb71f13fea07fe14d628fb6492 (patch)
tree7e4c23bf797415787601104a66f34c6e413ae8f7 /src/build_log.cc
parent926aa27a85bc7b1996fbebd651014bab078bfda5 (diff)
downloadNinja-bef0bbfb3e6b0fcb71f13fea07fe14d628fb6492.zip
Ninja-bef0bbfb3e6b0fcb71f13fea07fe14d628fb6492.tar.gz
Ninja-bef0bbfb3e6b0fcb71f13fea07fe14d628fb6492.tar.bz2
convert ExternalStringHash to use StringPiece
Diffstat (limited to 'src/build_log.cc')
-rw-r--r--src/build_log.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/build_log.cc b/src/build_log.cc
index b564137..f342e83 100644
--- a/src/build_log.cc
+++ b/src/build_log.cc
@@ -78,7 +78,7 @@ void BuildLog::RecordCommand(Edge* edge, int start_time, int end_time,
for (vector<Node*>::iterator out = edge->outputs_.begin();
out != edge->outputs_.end(); ++out) {
const string& path = (*out)->path();
- Log::iterator i = log_.find(path.c_str());
+ Log::iterator i = log_.find(path);
LogEntry* log_entry;
if (i != log_.end()) {
log_entry = i->second;
@@ -163,13 +163,13 @@ bool BuildLog::Load(const string& path, string* err) {
continue;
LogEntry* entry;
- Log::iterator i = log_.find(output.c_str());
+ Log::iterator i = log_.find(output);
if (i != log_.end()) {
entry = i->second;
} else {
entry = new LogEntry;
entry->output = output;
- log_.insert(make_pair(entry->output.c_str(), entry));
+ log_.insert(make_pair(entry->output, entry));
++unique_entry_count;
}
++total_entry_count;
@@ -198,7 +198,7 @@ bool BuildLog::Load(const string& path, string* err) {
}
BuildLog::LogEntry* BuildLog::LookupByOutput(const string& path) {
- Log::iterator i = log_.find(path.c_str());
+ Log::iterator i = log_.find(path);
if (i != log_.end())
return i->second;
return NULL;