From 40345a79c216760efc47e402c86bf1c40c54fd5d Mon Sep 17 00:00:00 2001 From: Sebastian Eibl <sebastian.eibl@fau.de> Date: Tue, 9 Jun 2020 08:26:29 +0000 Subject: [PATCH] [CLANG-TIDY] modernize-make-shared --- src/blockforest/python/Exports.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/blockforest/python/Exports.cpp b/src/blockforest/python/Exports.cpp index cd4419689..17f1b2534 100644 --- a/src/blockforest/python/Exports.cpp +++ b/src/blockforest/python/Exports.cpp @@ -41,6 +41,8 @@ #include "stencil/D3Q19.h" #include "stencil/D3Q27.h" +#include <memory> + #include <sstream> #ifdef _MSC_VER @@ -235,9 +237,9 @@ shared_ptr<StructuredBlockForest> createStructuredBlockForest( Vector3<uint_t> b MPIManager::instance()->useWorldComm(); // create StructuredBlockForest (encapsulates a newly created BlockForest) - auto bf = shared_ptr< BlockForest >( new BlockForest( uint_c( MPIManager::instance()->rank() ), sforest, keepGlobalBlockInformation ) ); + auto bf = std::make_shared< BlockForest >( uint_c( MPIManager::instance()->rank() ), sforest, keepGlobalBlockInformation ); - auto sbf = shared_ptr< StructuredBlockForest >( new StructuredBlockForest( bf, cellsPerBlock[0], cellsPerBlock[1], cellsPerBlock[2] ) ); + auto sbf = std::make_shared< StructuredBlockForest >( bf, cellsPerBlock[0], cellsPerBlock[1], cellsPerBlock[2] ); sbf->createCellBoundingBoxes(); return sbf; -- GitLab