diff options
author | Jan Holthuis <jan.holthuis@ruhr-uni-bochum.de> | 2020-11-24 15:59:50 +0100 |
---|---|---|
committer | Jan Holthuis <jan.holthuis@ruhr-uni-bochum.de> | 2020-11-24 18:11:12 +0100 |
commit | e6433e3176f15242611e7700bfae05b41799988f (patch) | |
tree | 4815ad10ffa4ce8b7aef43cfdf8bae5654ab269a | |
parent | 64630b28f8911ac35eb8e86c7c1da6e639b3c78a (diff) |
SampleUtilTest: Fix data loss warnings
Fixes:
src\test\sampleutiltest.cpp(557): warning C4267: 'argument': conversion from 'size_t' to 'int', possible loss of data
src\test\sampleutiltest.cpp(577): warning C4267: 'argument': conversion from 'size_t' to 'int', possible loss of data
-rw-r--r-- | src/test/sampleutiltest.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/test/sampleutiltest.cpp b/src/test/sampleutiltest.cpp index 6bc7d47f00..5bbf8eabb7 100644 --- a/src/test/sampleutiltest.cpp +++ b/src/test/sampleutiltest.cpp @@ -398,7 +398,7 @@ TEST_F(SampleUtilTest, copyReverse) { } static void BM_MemCpy(benchmark::State& state) { - size_t size = state.range(0); + SINT size = static_cast<SINT>(state.range(0)); CSAMPLE* buffer = SampleUtil::alloc(size); SampleUtil::fill(buffer, 0.0f, size); CSAMPLE* buffer2 = SampleUtil::alloc(size); @@ -414,7 +414,7 @@ static void BM_MemCpy(benchmark::State& state) { BENCHMARK(BM_MemCpy)->Range(64, 4096); static void BM_StdCpy(benchmark::State& state) { - size_t size = state.range(0); + SINT size = static_cast<SINT>(state.range(0)); CSAMPLE* buffer = SampleUtil::alloc(size); SampleUtil::fill(buffer, 0.0f, size); CSAMPLE* buffer2 = SampleUtil::alloc(size); @@ -430,7 +430,7 @@ static void BM_StdCpy(benchmark::State& state) { BENCHMARK(BM_StdCpy)->Range(64, 4096); static void BM_SampleUtilCopy(benchmark::State& state) { - size_t size = state.range(0); + SINT size = static_cast<SINT>(state.range(0)); CSAMPLE* buffer = SampleUtil::alloc(size); SampleUtil::fill(buffer, 0.0f, size); CSAMPLE* buffer2 = SampleUtil::alloc(size); @@ -545,7 +545,7 @@ TEST_F(SampleUtilTest, copy3WithGainSpeed) { */ static void BM_Copy2WithGain(benchmark::State& state) { - size_t size = state.range(0); + SINT size = static_cast<SINT>(state.range(0)); CSAMPLE* buffer = SampleUtil::alloc(size); SampleUtil::fill(buffer, 0.0f, size); CSAMPLE* buffer2 = SampleUtil::alloc(size); @@ -564,7 +564,7 @@ static void BM_Copy2WithGain(benchmark::State& state) { BENCHMARK(BM_Copy2WithGain)->Range(64, 4096); static void BM_Copy2WithRampingGain(benchmark::State& state) { - size_t size = state.range(0); + SINT size = static_cast<SINT>(state.range(0)); CSAMPLE* buffer = SampleUtil::alloc(size); SampleUtil::fill(buffer, 0.0f, size); CSAMPLE* buffer2 = SampleUtil::alloc(size); |