Commit 710bac35 authored by Mukund Sivaraman's avatar Mukund Sivaraman
Browse files

[2369] Initialize buffer_pos_ with 0

This is equivalent code to the former. The former was written such to
drive the point that buffer_pos_ is by default pointing at the end of
the buffer_ vector.  At construction, the buffer_ vector is empty, so
both work.
parent b27d601b
......@@ -33,7 +33,7 @@ InputSource::InputSource(std::istream& input_stream) :
at_eof_(false),
line_(1),
saved_line_(line_),
buffer_pos_(buffer_.size()),
buffer_pos_(0),
name_(createStreamName(input_stream)),
input_(input_stream)
{}
......@@ -42,7 +42,7 @@ InputSource::InputSource(const char* filename) :
at_eof_(false),
line_(1),
saved_line_(line_),
buffer_pos_(buffer_.size()),
buffer_pos_(0),
name_(filename),
input_(file_stream_)
{
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment