diff --git a/dune/stuff/functions/combined.hh b/dune/stuff/functions/combined.hh index 17ca192b030ca0c862c9b401f0b6e9cba3f91241..a32ac4caf963f4bffbae5db5df83e9df9090cb77 100644 --- a/dune/stuff/functions/combined.hh +++ b/dune/stuff/functions/combined.hh @@ -326,11 +326,12 @@ public: ThisType& operator=(ThisType&& other) = delete; - virtual std::unique_ptr<LocalfunctionType> local_function(const EntityType& entity) const /*DS_OVERRIDE DS_FINAL*/ + virtual std::unique_ptr<LocalfunctionType> local_function(const EntityType& entity) const DS_OVERRIDE DS_FINAL { typedef CombinedLocalFunction<LeftType, RightType, comb> RealLocalFunctionType; - return std::unique_ptr<RealLocalFunctionType>( - new RealLocalFunctionType(left_->storage_access(), right_->storage_access(), entity)); + assert(left_); + assert(right_); + return DSC::make_unique<RealLocalFunctionType>(left_->storage_access(), right_->storage_access(), entity); } // ... local_function(...) virtual ThisType* copy() const