diff options
author | Nico Weber <nicolasweber@gmx.de> | 2012-07-28 16:56:59 (GMT) |
---|---|---|
committer | Nico Weber <nicolasweber@gmx.de> | 2012-07-28 16:56:59 (GMT) |
commit | 957a801ace27426f3ceb544449f882dba1924161 (patch) | |
tree | 6a212b102467312452e89dc5472c2e4230f1cbc6 /src/lexer.cc | |
parent | 3ab35e5403066f48117f442f9ba8853e70edab13 (diff) | |
download | Ninja-957a801ace27426f3ceb544449f882dba1924161.zip Ninja-957a801ace27426f3ceb544449f882dba1924161.tar.gz Ninja-957a801ace27426f3ceb544449f882dba1924161.tar.bz2 |
Revert "Make StringPiece data members private."
This reverts commit 904c9610fe66c4f4bd63a07d6f057c8603d24394.
The commit caused issue #380, this revert fixes it. The revert
also makes the test from the previous commit pass.
Diffstat (limited to 'src/lexer.cc')
-rw-r--r-- | src/lexer.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lexer.cc b/src/lexer.cc index 45bf4ef..ca6f367 100644 --- a/src/lexer.cc +++ b/src/lexer.cc @@ -23,8 +23,8 @@ bool Lexer::Error(const string& message, string* err) { // Compute line/column. int line = 1; - const char* context = input_.str(); - for (const char* p = input_.str(); p < last_token_; ++p) { + const char* context = input_.str_; + for (const char* p = input_.str_; p < last_token_; ++p) { if (*p == '\n') { ++line; context = p + 1; @@ -66,7 +66,7 @@ Lexer::Lexer(const char* input) { void Lexer::Start(StringPiece filename, StringPiece input) { filename_ = filename; input_ = input; - ofs_ = input_.str(); + ofs_ = input_.str_; last_token_ = NULL; } |