From efb92c7d7e18bf8492fe6db5a97fc693db4e8b6c Mon Sep 17 00:00:00 2001 From: Timo Heister Date: Fri, 20 Oct 2017 16:26:16 -0400 Subject: [PATCH] SmartPointer: use nullptr instead of 0 --- include/deal.II/base/smartpointer.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/include/deal.II/base/smartpointer.h b/include/deal.II/base/smartpointer.h index 5f42149320..2f9ef1720b 100644 --- a/include/deal.II/base/smartpointer.h +++ b/include/deal.II/base/smartpointer.h @@ -236,7 +236,7 @@ SmartPointer::SmartPointer (const SmartPointer &tt) : t (tt.t), id(tt.id) { - if (t != 0) + if (t != nullptr) t->subscribe(id); } @@ -269,11 +269,11 @@ inline void SmartPointer::clear () { - if (t != 0) + if (t != nullptr) { t->unsubscribe(id); delete t; - t = 0; + t = nullptr; } } @@ -310,10 +310,10 @@ SmartPointer::operator = (const SmartPointer &tt) if (&tt == this) return *this; - if (t != 0) + if (t != nullptr) t->unsubscribe(id); t = static_cast(tt); - if (tt != 0) + if (tt != nullptr) tt->subscribe(id); return *this; } @@ -390,12 +390,12 @@ template inline void SmartPointer::swap (T *&tt) { - if (t != 0) + if (t != nullptr) t->unsubscribe (id); std::swap (t, tt); - if (t != 0) + if (t != nullptr) t->subscribe (id); } -- 2.39.5