From: Timo Heister Date: Fri, 20 Oct 2017 20:26:16 +0000 (-0400) Subject: SmartPointer: use nullptr instead of 0 X-Git-Tag: v9.0.0-rc1~918^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=efb92c7d7e18bf8492fe6db5a97fc693db4e8b6c;p=dealii.git SmartPointer: use nullptr instead of 0 --- 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); }