forked from catchorg/Catch2
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.
This commit is contained in:
@@ -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() );
|
||||
|
||||
|
||||
Reference in New Issue
Block a user