From 1cc33531ea7cf82e41b1ed49bf8ffc5afea084e4 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Wed, 4 Feb 2009 03:34:37 -0400 Subject: Simplified the textual parser, and improved metadata support. --- src/error.cc | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/error.cc') diff --git a/src/error.cc b/src/error.cc index 68a2d844..dbda8c30 100644 --- a/src/error.cc +++ b/src/error.cc @@ -50,21 +50,21 @@ string file_context(const path& file, std::size_t line) return buf.str(); } -string line_context(const string& line, - istream_pos_type pos, - istream_pos_type end_pos) +string line_context(const string& line, + std::size_t pos, + std::size_t end_pos) { std::ostringstream buf; buf << " " << line << "\n"; - if (pos != istream_pos_type(0)) { + if (pos != 0) { buf << " "; - if (end_pos == istream_pos_type(0)) { - for (istream_pos_type i = 0; i < pos; i += 1) + if (end_pos == 0) { + for (std::size_t i = 0; i < pos; i += 1) buf << " "; buf << "^"; } else { - for (istream_pos_type i = 0; i < end_pos; i += 1) { + for (std::size_t i = 0; i < end_pos; i += 1) { if (i >= pos) buf << "^"; else -- cgit v1.2.3