summaryrefslogtreecommitdiffstats
path: root/test/maid_test.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2018-09-16 22:11:37 +0200
committerDavid Robillard <d@drobilla.net>2018-09-16 22:11:37 +0200
commit0c6bb92f3f59b6b86f3b7b56224677e79b2e6900 (patch)
tree40e3173eec8b493f22152372cc00782f2a076f92 /test/maid_test.cpp
parent07396e8d23bb8724c5960b57aca33e08a97f4e52 (diff)
downloadraul-0c6bb92f3f59b6b86f3b7b56224677e79b2e6900.tar.gz
raul-0c6bb92f3f59b6b86f3b7b56224677e79b2e6900.tar.bz2
raul-0c6bb92f3f59b6b86f3b7b56224677e79b2e6900.zip
Lint with clang-tidy
Diffstat (limited to 'test/maid_test.cpp')
-rw-r--r--test/maid_test.cpp8
1 files changed, 4 insertions, 4 deletions
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<size_t> n_junk(0);
static std::atomic<size_t> n_finished_threads(0);
@@ -37,7 +37,7 @@ static std::atomic<size_t> 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<std::thread> 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)