diff options
author | David Robillard <d@drobilla.net> | 2017-12-16 10:30:44 +0100 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2017-12-16 10:30:44 +0100 |
commit | fc22583b1174c9b5e6d0364240431eaca932440d (patch) | |
tree | 4d7ac03769a3860c07563621197825cfab14244e /test/maid_test.cpp | |
parent | 4db870b2b20b0a608ec0283139056b836c5b1624 (diff) | |
download | raul-fc22583b1174c9b5e6d0364240431eaca932440d.tar.gz raul-fc22583b1174c9b5e6d0364240431eaca932440d.tar.bz2 raul-fc22583b1174c9b5e6d0364240431eaca932440d.zip |
Fix various warnings
Diffstat (limited to 'test/maid_test.cpp')
-rw-r--r-- | test/maid_test.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/test/maid_test.cpp b/test/maid_test.cpp index 8bf4f45..e21ba04 100644 --- a/test/maid_test.cpp +++ b/test/maid_test.cpp @@ -33,10 +33,10 @@ static std::atomic<size_t> n_finished_threads(0); class Junk : public Maid::Disposable { public: - explicit Junk(int v) : val(v) { ++n_junk; } + explicit Junk(size_t v) : val(v) { ++n_junk; } ~Junk() { --n_junk; } - int val; + size_t val; }; static void @@ -57,9 +57,9 @@ test() // Check basic single-threaded correctness { assert(n_junk == 0); - Maid::managed_ptr<Junk> a = maid.make_managed<Junk>(1); + Maid::managed_ptr<Junk> a = maid.make_managed<Junk>(1U); assert(n_junk == 1); - Maid::managed_ptr<Junk> b = maid.make_managed<Junk>(2); + Maid::managed_ptr<Junk> b = maid.make_managed<Junk>(2U); assert(n_junk == 2); } @@ -111,7 +111,7 @@ test() assert(n_junk == 0); // Allocate a new object, then let it and the Maid go out of scope - Maid::managed_ptr<Junk> c = maid.make_managed<Junk>(5); + Maid::managed_ptr<Junk> c = maid.make_managed<Junk>(5U); assert(n_junk == 1); } |