Skip to content
Snippets Groups Projects

Remove intermediate type ToUniquePtr in favor of std::unique_ptr

Merged Simon Praetorius requested to merge issue/remove-to-unique-ptr into master
1 unresolved thread
Files
2
@@ -20,7 +20,6 @@
#include <dune/common/function.hh>
#include <dune/common/fvector.hh>
#include <dune/common/hash.hh>
#include <dune/common/to_unique_ptr.hh>
#include <dune/grid/common/gridfactory.hh>
#include <dune/foamgrid/foamgrid.hh>
@@ -251,9 +250,11 @@ DUNE_NO_DEPRECATED_END
The receiver takes responsibility of the memory allocated for the grid
*/
#if DUNE_VERSION_LT(DUNE_COMMON, 2, 7)
FoamGrid<1, dimworld, ctype>* createGrid() override {
FoamGrid<dimgrid, dimworld, ctype>* createGrid() override {
#elif DUNE_VERSION_LT(DUNE_COMMON, 2, 8)
ToUniquePtr<FoamGrid<dimgrid, dimworld, ctype>> createGrid() override {
#else
ToUniquePtr<FoamGrid<1, dimworld, ctype>> createGrid() override {
std::unique_ptr<FoamGrid<dimgrid, dimworld,ctype>> createGrid() override {
#endif
// Prevent a crash when this method is called twice in a row
// You never know who may do this...
@@ -449,8 +450,10 @@ DUNE_NO_DEPRECATED_END
*/
#if DUNE_VERSION_LT(DUNE_COMMON, 2, 7)
FoamGrid<dimgrid, dimworld, ctype>* createGrid() override {
#else
#elif DUNE_VERSION_LT(DUNE_COMMON, 2, 8)
ToUniquePtr<FoamGrid<dimgrid, dimworld, ctype>> createGrid() override {
#else
std::unique_ptr<FoamGrid<dimgrid, dimworld,ctype>> createGrid() override {
#endif
// Prevent a crash when this method is called twice in a row
// You never know who may do this...
Loading