summaryrefslogtreecommitdiff
path: root/src/error.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/error.cc')
-rw-r--r--src/error.cc24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/error.cc b/src/error.cc
index 4b3a7786..39ac63ea 100644
--- a/src/error.cc
+++ b/src/error.cc
@@ -55,9 +55,9 @@ string file_context(const path& file, const std::size_t line)
return buf.str();
}
-string line_context(const string& line,
- const string::size_type pos,
- const string::size_type end_pos)
+string line_context(const string& line,
+ const string::size_type pos,
+ const string::size_type end_pos)
{
std::ostringstream buf;
buf << " " << line << "\n";
@@ -66,24 +66,24 @@ string line_context(const string& line,
buf << " ";
if (end_pos == 0) {
for (string::size_type i = 0; i < pos; i += 1)
- buf << " ";
+ buf << " ";
buf << "^";
} else {
for (string::size_type i = 0; i < end_pos; i += 1) {
- if (i >= pos)
- buf << "^";
- else
- buf << " ";
+ if (i >= pos)
+ buf << "^";
+ else
+ buf << " ";
}
}
}
return buf.str();
}
-string source_context(const path& file,
- const istream_pos_type pos,
- const istream_pos_type end_pos,
- const string& prefix)
+string source_context(const path& file,
+ const istream_pos_type pos,
+ const istream_pos_type end_pos,
+ const string& prefix)
{
const std::streamoff len = end_pos - pos;
if (! len || file == path("/dev/stdin"))