From fc22583b1174c9b5e6d0364240431eaca932440d Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sat, 16 Dec 2017 10:30:44 +0100 Subject: Fix various warnings --- test/maid_test.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'test/maid_test.cpp') 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 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 a = maid.make_managed(1); + Maid::managed_ptr a = maid.make_managed(1U); assert(n_junk == 1); - Maid::managed_ptr b = maid.make_managed(2); + Maid::managed_ptr b = maid.make_managed(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 c = maid.make_managed(5); + Maid::managed_ptr c = maid.make_managed(5U); assert(n_junk == 1); } -- cgit v1.2.1