From 0c6bb92f3f59b6b86f3b7b56224677e79b2e6900 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sun, 16 Sep 2018 22:11:37 +0200 Subject: Lint with clang-tidy --- test/maid_test.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'test/maid_test.cpp') diff --git a/test/maid_test.cpp b/test/maid_test.cpp index ba4086a..94e09c6 100644 --- a/test/maid_test.cpp +++ b/test/maid_test.cpp @@ -28,8 +28,8 @@ using Raul::Maid; -static const size_t n_threads = 8; -static const size_t n_junk_per_thread = 1 << 18; +static const size_t n_threads = 8U; +static const size_t n_junk_per_thread = 1U << 18U; static std::atomic n_junk(0); static std::atomic n_finished_threads(0); @@ -37,7 +37,7 @@ static std::atomic n_finished_threads(0); class Junk : public Maid::Disposable { public: explicit Junk(size_t v) : val(v) { ++n_junk; } - ~Junk() { --n_junk; } + ~Junk() override { --n_junk; } size_t val; }; @@ -79,7 +79,7 @@ test() // Create some threads to produce garbage std::vector litterers; for (size_t i = 0; i < n_threads; ++i) { - litterers.push_back(std::thread(litter, &maid)); + litterers.emplace_back(litter, &maid); } // Wait for some garbage to show up if necessary (unlikely) -- cgit v1.2.1