refactor: use C++11 default initializers

This commit is contained in:
fanquake
2022-05-11 16:02:15 +01:00
parent d5d40d59f8
commit 7aa40f5563
39 changed files with 57 additions and 88 deletions

View File

@@ -2450,9 +2450,9 @@ struct Tracker
//! Points to the original object (possibly itself) we moved/copied from
const Tracker* origin;
//! How many copies where involved between the original object and this one (moves are not counted)
int copies;
int copies{0};
Tracker() noexcept : origin(this), copies(0) {}
Tracker() noexcept : origin(this) {}
Tracker(const Tracker& t) noexcept : origin(t.origin), copies(t.copies + 1) {}
Tracker(Tracker&& t) noexcept : origin(t.origin), copies(t.copies) {}
Tracker& operator=(const Tracker& t) noexcept