diff options
author | David Robillard <d@drobilla.net> | 2020-07-18 10:37:35 +0200 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2020-07-18 10:37:57 +0200 |
commit | 242bbeb5649b62a9af4268139afe6f57250520e0 (patch) | |
tree | 3d7841d7d999c7dfe428e66bd0e3f4db6d5a51b3 /test | |
parent | a474f0f93241672f804f88bdf934ab85e79f20c5 (diff) | |
download | raul-242bbeb5649b62a9af4268139afe6f57250520e0.tar.gz raul-242bbeb5649b62a9af4268139afe6f57250520e0.tar.bz2 raul-242bbeb5649b62a9af4268139afe6f57250520e0.zip |
Fix various clang-tidy warnings
Diffstat (limited to 'test')
-rw-r--r-- | test/maid_test.cpp | 8 | ||||
-rw-r--r-- | test/ringbuffer_test.cpp | 2 |
2 files changed, 7 insertions, 3 deletions
diff --git a/test/maid_test.cpp b/test/maid_test.cpp index c2a5856..47781a0 100644 --- a/test/maid_test.cpp +++ b/test/maid_test.cpp @@ -36,10 +36,13 @@ static std::atomic<size_t> n_finished_threads(0); class Junk : public Maid::Disposable { public: - explicit Junk(size_t v) : val(v) { ++n_junk; } + explicit Junk(size_t v) : _val(v) { ++n_junk; } ~Junk() override { --n_junk; } - size_t val; + size_t value() const { return _val; } + +private: + size_t _val; }; static void @@ -47,6 +50,7 @@ litter(Maid* maid) { for (size_t i = 0; i < n_junk_per_thread; ++i) { Maid::managed_ptr<Junk> a = maid->make_managed<Junk>(i); + assert(a->value() == i); } ++n_finished_threads; diff --git a/test/ringbuffer_test.cpp b/test/ringbuffer_test.cpp index 37a2740..d7caeaf 100644 --- a/test/ringbuffer_test.cpp +++ b/test/ringbuffer_test.cpp @@ -28,7 +28,7 @@ #include <string> #include <thread> -#define MSG_SIZE 20u +constexpr const auto MSG_SIZE = 20u; namespace { |