From fda85df7d0e5a892ba9fc17fd892b10f450e07b1 Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Mon, 23 Jan 2023 17:01:51 +0200 Subject: [PATCH] Use nullptr instead of 0 --- source/geometry/extrudedshape.h | 2 +- source/geometry/negation.h | 2 +- source/geometry/transformedshape.h | 2 +- source/interpolate/spline.h | 4 ++-- source/linal/dynamicmatrix.h | 2 +- source/linal/dynamicvector.h | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/source/geometry/extrudedshape.h b/source/geometry/extrudedshape.h index e57ee94..21a503a 100644 --- a/source/geometry/extrudedshape.h +++ b/source/geometry/extrudedshape.h @@ -17,7 +17,7 @@ template class ExtrudedShape: public Shape { private: - Shape *base = 0; + Shape *base = nullptr; T length = T(1); public: diff --git a/source/geometry/negation.h b/source/geometry/negation.h index c2f96e9..231a610 100644 --- a/source/geometry/negation.h +++ b/source/geometry/negation.h @@ -14,7 +14,7 @@ template class Negation: public Shape { private: - Shape *shape = 0; + Shape *shape = nullptr; public: Negation(const Shape &); diff --git a/source/geometry/transformedshape.h b/source/geometry/transformedshape.h index b53f5b8..2c39201 100644 --- a/source/geometry/transformedshape.h +++ b/source/geometry/transformedshape.h @@ -14,7 +14,7 @@ template class TransformedShape: public Shape { private: - Shape *shape = 0; + Shape *shape = nullptr; AffineTransform transformation; AffineTransform inverse_trans; diff --git a/source/interpolate/spline.h b/source/interpolate/spline.h index 7c5e032..1d518eb 100644 --- a/source/interpolate/spline.h +++ b/source/interpolate/spline.h @@ -65,7 +65,7 @@ private: unsigned short n_segments = 0; unsigned short capacity = 0; - char *segments = 0; + char *segments = nullptr; public: Spline() = default; @@ -119,7 +119,7 @@ inline Spline &Spline::operator=(const Spline &s) delete[] segments; n_segments = 0; capacity = 0; - segments = 0; + segments = nullptr; } return *this; diff --git a/source/linal/dynamicmatrix.h b/source/linal/dynamicmatrix.h index 74c9361..61cf50e 100644 --- a/source/linal/dynamicmatrix.h +++ b/source/linal/dynamicmatrix.h @@ -23,7 +23,7 @@ public: private: unsigned rows_ = 0; unsigned columns_ = 0; - T *data = 0; + T *data = nullptr; public: DynamicMatrix(unsigned, unsigned); diff --git a/source/linal/dynamicvector.h b/source/linal/dynamicvector.h index 3f66ad7..a6a5918 100644 --- a/source/linal/dynamicvector.h +++ b/source/linal/dynamicvector.h @@ -29,7 +29,7 @@ public: private: unsigned size_ = 0; - T *data = 0; + T *data = nullptr; public: DynamicVector(unsigned); -- 2.45.2