Fix warning in tests
This commit is contained in:
parent
2b80d77e50
commit
a0d8b23bff
1 changed files with 5 additions and 5 deletions
|
|
@ -151,13 +151,13 @@ TEST_CASE("[Buffer] Buffer counter")
|
||||||
sfz::BufferCounter& counter = sfz::Buffer<float>::counter();
|
sfz::BufferCounter& counter = sfz::Buffer<float>::counter();
|
||||||
|
|
||||||
// handle the eventuality that the buffer counter does not start at zero
|
// handle the eventuality that the buffer counter does not start at zero
|
||||||
const int initialNumBuffers = counter.getNumBuffers();
|
const size_t initialNumBuffers = counter.getNumBuffers();
|
||||||
const int initialTotalBytes = counter.getTotalBytes();
|
const size_t initialTotalBytes = counter.getTotalBytes();
|
||||||
auto haveNumBuffers = [&](int n) -> bool {
|
auto haveNumBuffers = [&](size_t n) -> bool {
|
||||||
return n == counter.getNumBuffers() - initialNumBuffers;
|
return n == counter.getNumBuffers() - initialNumBuffers;
|
||||||
};
|
};
|
||||||
auto haveTotalAllocation = [&](int n) -> bool {
|
auto haveTotalAllocation = [&](size_t n) -> bool {
|
||||||
return n * static_cast<int>(sizeof(float)) == counter.getTotalBytes() - initialTotalBytes;
|
return n * sizeof(float) == counter.getTotalBytes() - initialTotalBytes;
|
||||||
};
|
};
|
||||||
|
|
||||||
// create an empty buffer
|
// create an empty buffer
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue