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

summaryrefslogtreecommitdiffhomepage
path: root/src/catch2/catch_enum_values_registry.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_enum_values_registry.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_enum_values_registry.cpp')
-rw-r--r--src/catch2/catch_enum_values_registry.cpp2
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() );