diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2020-05-14 14:50:17 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-14 14:50:17 +0200 |
commit | 15b25b739dab84dcde99deaf29e75547ec941f45 (patch) | |
tree | 90aa672d8623d299282bf6f2bbb7216f6738cdf3 /core/list.h | |
parent | 5f5f53e8eba5c9b708714de58d3cca6ceb010279 (diff) | |
parent | a1aaed5a84e5206032495ee3d7447847aa8c9515 (diff) |
Merge pull request #38736 from akien-mga/modernize-all-the-things
C++: Apply some `modernize-*` checks from clang-tidy (nullptr, bool literals, void args)
Diffstat (limited to 'core/list.h')
-rw-r--r-- | core/list.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/core/list.h b/core/list.h index eb74fa7917..7fbf3e50fc 100644 --- a/core/list.h +++ b/core/list.h @@ -182,14 +182,14 @@ public: */ _FORCE_INLINE_ const Element *front() const { - return _data ? _data->first : 0; + return _data ? _data->first : nullptr; }; /** * return an iterator to the beginning of the list. */ _FORCE_INLINE_ Element *front() { - return _data ? _data->first : 0; + return _data ? _data->first : nullptr; }; /** @@ -197,7 +197,7 @@ public: */ _FORCE_INLINE_ const Element *back() const { - return _data ? _data->last : 0; + return _data ? _data->last : nullptr; }; /** @@ -205,7 +205,7 @@ public: */ _FORCE_INLINE_ Element *back() { - return _data ? _data->last : 0; + return _data ? _data->last : nullptr; }; /** @@ -225,7 +225,7 @@ public: n->value = (T &)value; n->prev_ptr = _data->last; - n->next_ptr = 0; + n->next_ptr = nullptr; n->data = _data; if (_data->last) { @@ -264,7 +264,7 @@ public: Element *n = memnew_allocator(Element, A); n->value = (T &)value; - n->prev_ptr = 0; + n->prev_ptr = nullptr; n->next_ptr = _data->first; n->data = _data; |