From 311031ecd03dbfbf43e1df672a395f24b2e7d4d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastia=CC=81n=20Barschkis?= Date: Fri, 6 Nov 2020 11:44:05 +0100 Subject: Cleanup: Use nullptr everywhere in fluid code Switched from NULL to nullptr. --- extern/mantaflow/helper/util/rcmatrix.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'extern/mantaflow/helper/util/rcmatrix.h') diff --git a/extern/mantaflow/helper/util/rcmatrix.h b/extern/mantaflow/helper/util/rcmatrix.h index 3a466952ac2..f1f0efe6416 100644 --- a/extern/mantaflow/helper/util/rcmatrix.h +++ b/extern/mantaflow/helper/util/rcmatrix.h @@ -157,18 +157,18 @@ template struct RCMatrix { { for (N i = 0; i < n; i++) { dealloc_row(i); - matrix[i] = NULL; + matrix[i] = nullptr; if (offsets.size()) offsets[i] = 0; } }; bool empty(N i) const { - return matrix[i] == NULL; + return matrix[i] == nullptr; } N row_nonzero_size(N i) const { - return matrix[i] == NULL ? 0 : matrix[i]->index.size(); + return matrix[i] == nullptr ? 0 : matrix[i]->index.size(); } void resize(N size, N expected_none_zeros = 0) { @@ -185,7 +185,7 @@ template struct RCMatrix { // Expanding matrix.resize(size); for (N i = n; i < size; i++) { - matrix[i] = NULL; + matrix[i] = nullptr; if (offsets.size()) offsets[i] = 0; } @@ -209,7 +209,7 @@ template struct RCMatrix { if (matrix[i]) { if (offsets.empty() || !offsets[i]) delete matrix[i]; - matrix[i] = NULL; + matrix[i] = nullptr; if (offsets.size()) offsets[i] = 0; } @@ -426,7 +426,7 @@ template struct RCMatrix { } operator bool() const { - return rowEntry != NULL && k < (N)rowEntry->index.size(); + return rowEntry != nullptr && k < (N)rowEntry->index.size(); } Iterator &operator++() { @@ -447,7 +447,7 @@ template struct RCMatrix { } N size() const { - return rowEntry == NULL ? 0 : rowEntry->index.size(); + return rowEntry == nullptr ? 0 : rowEntry->index.size(); } protected: -- cgit v1.2.3