commit 9ec57529ec94779c6c708497659d74685c53674f
parent c7f30c1436093f45bbf1e2360b9d50562e326712
Author: d.levin256@gmail.com <d.levin256@gmail.com>
Date: Thu, 21 Feb 2019 19:51:10 +0000
Call val_of with type, not value
Diffstat:
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/include/kfr/base/conversion.hpp b/include/kfr/base/conversion.hpp
@@ -264,7 +264,7 @@ template <typename Tout, typename Tout_traits = audio_sample_traits<Tout>>
void convert(Tout* out, const void* in, audio_sample_type in_type, size_t size)
{
cswitch(audio_sample_type_clist{}, in_type, [&](auto t) {
- using type = typename audio_sample_get_type<val_of(t)>::type;
+ using type = typename audio_sample_get_type<val_of(decltype(t)())>::type;
convert(out, reinterpret_cast<const type*>(in), size);
});
}
@@ -274,7 +274,7 @@ template <typename Tin, typename Tin_traits = audio_sample_traits<Tin>>
void convert(void* out, audio_sample_type out_type, const Tin* in, size_t size)
{
cswitch(audio_sample_type_clist{}, out_type, [&](auto t) {
- using type = typename audio_sample_get_type<val_of(t)>::type;
+ using type = typename audio_sample_get_type<val_of(decltype(t)())>::type;
convert(reinterpret_cast<type*>(out), in, size);
});
}
diff --git a/tests/dft_test.cpp b/tests/dft_test.cpp
@@ -51,7 +51,7 @@ TEST(test_correlate)
CHECK(rms(c - univector<fbase>({ 1.5, 1., 1.5, 2.5, 3.75, -4., 7.75, 3.5, 1.25 })) < 0.0001);
}
-#ifdef CMT_ARCH_ARM
+#if defined CMT_ARCH_ARM || !defined NDEBUG
constexpr size_t fft_stopsize = 12;
constexpr size_t dft_stopsize = 101;
#else