aboutsummaryrefslogtreecommitdiffstats
path: root/SourceReferenceFormatter.cpp
diff options
context:
space:
mode:
authorChristian <c@ethdev.com>2014-10-24 22:47:10 +0800
committerChristian <c@ethdev.com>2014-10-24 22:47:10 +0800
commit33babb0c6fab4ea6851720a633ad847793208b1a (patch)
treeafda2073b82e2a3daa5e2c3ae26ca1d41df6658b /SourceReferenceFormatter.cpp
parentf8038792cab8ed7ffb75b12d01cbe8f5a93555fc (diff)
downloaddexon-solidity-33babb0c6fab4ea6851720a633ad847793208b1a.tar
dexon-solidity-33babb0c6fab4ea6851720a633ad847793208b1a.tar.gz
dexon-solidity-33babb0c6fab4ea6851720a633ad847793208b1a.tar.bz2
dexon-solidity-33babb0c6fab4ea6851720a633ad847793208b1a.tar.lz
dexon-solidity-33babb0c6fab4ea6851720a633ad847793208b1a.tar.xz
dexon-solidity-33babb0c6fab4ea6851720a633ad847793208b1a.tar.zst
dexon-solidity-33babb0c6fab4ea6851720a633ad847793208b1a.zip
Use endl instead of "\n".
Diffstat (limited to 'SourceReferenceFormatter.cpp')
-rw-r--r--SourceReferenceFormatter.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/SourceReferenceFormatter.cpp b/SourceReferenceFormatter.cpp
index 665df32a..bc9e8f26 100644
--- a/SourceReferenceFormatter.cpp
+++ b/SourceReferenceFormatter.cpp
@@ -42,16 +42,16 @@ void SourceReferenceFormatter::printSourceLocation(std::ostream& _stream,
std::tie(endLine, endColumn) = _scanner.translatePositionToLineColumn(_location.end);
if (startLine == endLine)
{
- _stream << _scanner.getLineAtPosition(_location.start) << "\n"
+ _stream << _scanner.getLineAtPosition(_location.start) << std::endl
<< std::string(startColumn, ' ') << "^";
if (endColumn > startColumn + 2)
_stream << std::string(endColumn - startColumn - 2, '-');
if (endColumn > startColumn + 1)
_stream << "^";
- _stream << "\n";
+ _stream << std::endl;
}
else
- _stream << _scanner.getLineAtPosition(_location.start) << "\n"
+ _stream << _scanner.getLineAtPosition(_location.start) << std::endl
<< std::string(startColumn, ' ') << "^\n"
<< "Spanning multiple lines.\n";
}
@@ -63,8 +63,8 @@ void SourceReferenceFormatter::printSourcePosition(std::ostream& _stream,
int line;
int column;
std::tie(line, column) = _scanner.translatePositionToLineColumn(_position);
- _stream << "at line " << (line + 1) << ", column " << (column + 1) << "\n"
- << _scanner.getLineAtPosition(_position) << "\n"
+ _stream << "at line " << (line + 1) << ", column " << (column + 1) << std::endl
+ << _scanner.getLineAtPosition(_position) << std::endl
<< std::string(column, ' ') << "^" << std::endl;
}