diff options
author | fanquake <fanquake@gmail.com> | 2022-05-11 16:02:15 +0100 |
---|---|---|
committer | fanquake <fanquake@gmail.com> | 2022-05-17 17:18:58 +0100 |
commit | 7aa40f55636be565441a9e0af8de0a346bfa4da2 (patch) | |
tree | cec851bcb9c00ea0d37da6b96cc5c65f2366862a /src/test/util_tests.cpp | |
parent | d5d40d59f8d12cf53c5ad1ce9710f3f108cec386 (diff) |
refactor: use C++11 default initializers
Diffstat (limited to 'src/test/util_tests.cpp')
-rw-r--r-- | src/test/util_tests.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/test/util_tests.cpp b/src/test/util_tests.cpp index 882ad7d424..c110cd44aa 100644 --- a/src/test/util_tests.cpp +++ b/src/test/util_tests.cpp @@ -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 |