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_enum_values_registry.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_enum_values_registry.cpp')
| -rw-r--r-- | src/catch2/catch_enum_values_registry.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/catch2/catch_enum_values_registry.cpp b/src/catch2/catch_enum_values_registry.cpp index f7d11860..79261bcf 100644 --- a/src/catch2/catch_enum_values_registry.cpp +++ b/src/catch2/catch_enum_values_registry.cpp @@ -52,7 +52,7 @@ namespace Catch { } std::unique_ptr<EnumInfo> makeEnumInfo( StringRef enumName, StringRef allValueNames, std::vector<int> const& values ) { - std::unique_ptr<EnumInfo> enumInfo( new EnumInfo ); + auto enumInfo = std::make_unique<EnumInfo>(); enumInfo->m_name = enumName; enumInfo->m_values.reserve( values.size() ); |