Read-only mirrors. Development, issues and pull requests are on GitHub.

summaryrefslogtreecommitdiffhomepage
path: root/src/catch2/internal
diff options
context:
space:
mode:
authorMartin Hořeňovský2021-05-29 11:24:42 +0200
committerMartin Hořeňovský2021-05-29 13:15:46 +0200
commitc9027375a3e57b59ecdeba696d3031163e473108 (patch)
tree693bbc68a9d70fb1ac7a582f4bb9735f611b9ed0 /src/catch2/internal
parent2ae28fc8525813023f8ec0f5318670cfaf86ec83 (diff)
downloadcatch3-c9027375a3e57b59ecdeba696d3031163e473108.tar.gz
Replace std::endl with \n and flush
In some places the `std::flush` was not added, as it was sufficiently obvious that the flush semantics are not intended. There are likely other places where the flush semantics aren't intended, but that is a cleanup for later.
Diffstat (limited to 'src/catch2/internal')
-rw-r--r--src/catch2/internal/catch_debugger.cpp2
-rw-r--r--src/catch2/internal/catch_xmlwriter.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/catch2/internal/catch_debugger.cpp b/src/catch2/internal/catch_debugger.cpp
index e1764034..3c80173a 100644
--- a/src/catch2/internal/catch_debugger.cpp
+++ b/src/catch2/internal/catch_debugger.cpp
@@ -53,7 +53,7 @@
size = sizeof(info);
if( sysctl(mib, sizeof(mib) / sizeof(*mib), &info, &size, nullptr, 0) != 0 ) {
- Catch::cerr() << "\n** Call to sysctl failed - unable to determine if debugger is active **\n" << std::endl;
+ Catch::cerr() << "\n** Call to sysctl failed - unable to determine if debugger is active **\n\n" << std::flush;
return false;
}
diff --git a/src/catch2/internal/catch_xmlwriter.cpp b/src/catch2/internal/catch_xmlwriter.cpp
index 4ea09ab5..80ff4108 100644
--- a/src/catch2/internal/catch_xmlwriter.cpp
+++ b/src/catch2/internal/catch_xmlwriter.cpp
@@ -329,7 +329,7 @@ namespace {
void XmlWriter::newlineIfNecessary() {
if( m_needsNewline ) {
- m_os << std::endl;
+ m_os << '\n' << std::flush;
m_needsNewline = false;
}
}