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

summaryrefslogtreecommitdiffhomepage
path: root/src/catch2/catch_stream.cpp
diff options
context:
space:
mode:
authorMartin Hořeňovský2020-02-01 21:43:00 +0100
committerMartin Hořeňovský2020-02-01 23:34:00 +0100
commitea6db670632204bace889f646ca08bfa58bddeab (patch)
treee47f559036a91dd062ae6400f2612c398c6a9014 /src/catch2/catch_stream.cpp
parenta7b3e087a03f6ba33100c842445f16757d545fc0 (diff)
downloadcatch3-ea6db670632204bace889f646ca08bfa58bddeab.tar.gz
Use std::make_unique instead of our polyfill or naked new
The use we previously used the polyfill or naked new is that we supported C++11, which did not yet have `std::make_unique`. However, with the move to C++14 as the minimum, `std::make_unique` can be expected to be always available.
Diffstat (limited to 'src/catch2/catch_stream.cpp')
-rw-r--r--src/catch2/catch_stream.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/catch2/catch_stream.cpp b/src/catch2/catch_stream.cpp
index 6c8e2828..23a43001 100644
--- a/src/catch2/catch_stream.cpp
+++ b/src/catch2/catch_stream.cpp
@@ -108,7 +108,7 @@ namespace Catch {
mutable std::ostream m_os;
public:
DebugOutStream()
- : m_streamBuf( new StreamBufImpl<OutputDebugWriter>() ),
+ : m_streamBuf( std::make_unique<StreamBufImpl<OutputDebugWriter>>() ),
m_os( m_streamBuf.get() )
{}