diff options
author | Sebastián Barschkis <sebbas@sebbas.org> | 2020-11-06 13:44:05 +0300 |
---|---|---|
committer | Sebastián Barschkis <sebbas@sebbas.org> | 2020-11-06 14:06:05 +0300 |
commit | 311031ecd03dbfbf43e1df672a395f24b2e7d4d3 (patch) | |
tree | baa75eb4b3e62d1caeb710d39291112e41112b37 /extern/mantaflow/helper/util/rcmatrix.h | |
parent | 37b155420b7cba189e69f648728be967943c4ec0 (diff) |
Cleanup: Use nullptr everywhere in fluid code
Switched from NULL to nullptr.
Diffstat (limited to 'extern/mantaflow/helper/util/rcmatrix.h')
-rw-r--r-- | extern/mantaflow/helper/util/rcmatrix.h | 14 |
1 files changed, 7 insertions, 7 deletions
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<class N, class T> 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<class N, class T> 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<class N, class T> 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<class N, class T> 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<class N, class T> struct RCMatrix { } N size() const { - return rowEntry == NULL ? 0 : rowEntry->index.size(); + return rowEntry == nullptr ? 0 : rowEntry->index.size(); } protected: |