From a0d8b23bff03b65e99862924e4118367e85406e4 Mon Sep 17 00:00:00 2001 From: Jean Pierre Cimalando Date: Wed, 24 Feb 2021 02:28:25 +0100 Subject: [PATCH] Fix warning in tests --- tests/BufferT.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/BufferT.cpp b/tests/BufferT.cpp index ed5f986f..025f9eae 100644 --- a/tests/BufferT.cpp +++ b/tests/BufferT.cpp @@ -151,13 +151,13 @@ TEST_CASE("[Buffer] Buffer counter") sfz::BufferCounter& counter = sfz::Buffer::counter(); // handle the eventuality that the buffer counter does not start at zero - const int initialNumBuffers = counter.getNumBuffers(); - const int initialTotalBytes = counter.getTotalBytes(); - auto haveNumBuffers = [&](int n) -> bool { + const size_t initialNumBuffers = counter.getNumBuffers(); + const size_t initialTotalBytes = counter.getTotalBytes(); + auto haveNumBuffers = [&](size_t n) -> bool { return n == counter.getNumBuffers() - initialNumBuffers; }; - auto haveTotalAllocation = [&](int n) -> bool { - return n * static_cast(sizeof(float)) == counter.getTotalBytes() - initialTotalBytes; + auto haveTotalAllocation = [&](size_t n) -> bool { + return n * sizeof(float) == counter.getTotalBytes() - initialTotalBytes; }; // create an empty buffer