diff options
| author | Martin Hořeňovský | 2020-02-01 21:43:00 +0100 |
|---|---|---|
| committer | Martin Hořeňovský | 2020-02-01 23:34:00 +0100 |
| commit | ea6db670632204bace889f646ca08bfa58bddeab (patch) | |
| tree | e47f559036a91dd062ae6400f2612c398c6a9014 /src/catch2/catch_stream.cpp | |
| parent | a7b3e087a03f6ba33100c842445f16757d545fc0 (diff) | |
| download | catch3-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.cpp | 2 |
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() ) {} |