From 74f4a117f366eb0ec2f026ada2dc3eb90b1d64e6 Mon Sep 17 00:00:00 2001 From: Elias Pipping <elias.pipping@fu-berlin.de> Date: Thu, 22 Dec 2011 16:03:44 +0100 Subject: [PATCH] Use nullptr --- dune/tectonic/globalruinanonlinearity.hh | 3 ++- dune/tectonic/myblockproblem.hh | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/dune/tectonic/globalruinanonlinearity.hh b/dune/tectonic/globalruinanonlinearity.hh index 4397aa34..cc854631 100644 --- a/dune/tectonic/globalruinanonlinearity.hh +++ b/dune/tectonic/globalruinanonlinearity.hh @@ -3,6 +3,7 @@ #include <vector> +#include <dune/common/nullptr.hh> #include <dune/common/fmatrix.hh> #include <dune/common/fvector.hh> #include <dune/istl/bcrsmatrix.hh> @@ -45,7 +46,7 @@ class GlobalRuinaNonlinearity if ((*nodalIntegrals)[i][0] == 0) return trivialNonlinearity; - if (restrictions[i] != NULL) + if (restrictions[i] != nullptr) return restrictions[i]; auto const func = make_shared<RuinaFunction const>( diff --git a/dune/tectonic/myblockproblem.hh b/dune/tectonic/myblockproblem.hh index 8498bf00..97091a45 100644 --- a/dune/tectonic/myblockproblem.hh +++ b/dune/tectonic/myblockproblem.hh @@ -4,6 +4,7 @@ #define MY_BLOCK_PROBLEM_HH #include <dune/common/bitsetvector.hh> +#include <dune/common/nullptr.hh> #include <dune/common/parametertree.hh> #include <dune/solvers/common/staticmatrixtools.hh> @@ -242,7 +243,7 @@ class MyBlockProblem<MyConvexProblemTypeTEMPLATE>::IterateObject { assert(false); } - LocalMatrixType const *localA = NULL; + LocalMatrixType const *localA = nullptr; LocalVectorType localb(problem.f[m]); typename MatrixType::row_type::ConstIterator it; @@ -254,7 +255,7 @@ class MyBlockProblem<MyConvexProblemTypeTEMPLATE>::IterateObject { else it->mmv(u[j], localb); // localb -= A[m][j] * u[j] } - assert(localA != NULL); + assert(localA != nullptr); auto const phi = problem.phi.restriction(m); Dune::SampleFunctional<block_size> localJ(*localA, localb, phi, -- GitLab