aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2018-05-26 15:55:02 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2018-05-26 15:55:02 +0200
commitff02e4f49af0136458a38ac5d8d197d7b7c3fd76 (patch)
tree5a12e1864c2dbabf88df3c59ef789d6b7ae12d09
parentf24909d04c3e0db53e7bb58ba8a2dc3eca055f72 (diff)
Only print column if printed line
-rw-r--r--build2/diagnostics.cxx10
1 files changed, 6 insertions, 4 deletions
diff --git a/build2/diagnostics.cxx b/build2/diagnostics.cxx
index d972c01..40fa381 100644
--- a/build2/diagnostics.cxx
+++ b/build2/diagnostics.cxx
@@ -72,12 +72,14 @@ namespace build2
if (!ops.no_line ())
{
if (loc_.line != 0)
+ {
r << loc_.line << ':';
- if (!ops.no_column ())
- {
- if (loc_.column != 0)
- r << loc_.column << ':';
+ if (!ops.no_column ())
+ {
+ if (loc_.column != 0)
+ r << loc_.column << ':';
+ }
}
}