aboutsummaryrefslogtreecommitdiffstats
path: root/utils
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2023-05-05 06:46:00 -0700
committerChris Robinson <[email protected]>2023-05-05 06:46:00 -0700
commit3ec03cadd2b5059e54e5e9b8f4d506b4c6ce727d (patch)
tree623b8e96f8acca9d55fb96b74e8d832877b27451 /utils
parentc14ca5f3aa6da354440a60656062f6bc68d6fca6 (diff)
Use deduction guides instead of helper functions for spans
Diffstat (limited to 'utils')
-rw-r--r--utils/makemhr/loaddef.cpp2
-rw-r--r--utils/makemhr/loadsofa.cpp2
-rw-r--r--utils/makemhr/makemhr.h4
3 files changed, 4 insertions, 4 deletions
diff --git a/utils/makemhr/loaddef.cpp b/utils/makemhr/loaddef.cpp
index 84fbb48b..c8a98511 100644
--- a/utils/makemhr/loaddef.cpp
+++ b/utils/makemhr/loaddef.cpp
@@ -1450,7 +1450,7 @@ static int ProcessMetrics(TokenReaderT *tr, const uint fftSize, const uint trunc
}
if(hData->mChannelType == CT_NONE)
hData->mChannelType = CT_MONO;
- const auto azs = al::as_span(azCounts).first<MAX_FD_COUNT>();
+ const auto azs = al::span{azCounts}.first<MAX_FD_COUNT>();
if(!PrepareHrirData({distances, fdCount}, evCounts, azs, hData))
{
fprintf(stderr, "Error: Out of memory.\n");
diff --git a/utils/makemhr/loadsofa.cpp b/utils/makemhr/loadsofa.cpp
index 9e661839..9bcfc38d 100644
--- a/utils/makemhr/loadsofa.cpp
+++ b/utils/makemhr/loadsofa.cpp
@@ -87,7 +87,7 @@ static bool PrepareLayout(const uint m, const float *xyzs, HrirDataT *hData)
++fi;
}
fprintf(stdout, "Using %u of %u IRs.\n", ir_total, m);
- const auto azs = al::as_span(azCounts).first<MAX_FD_COUNT>();
+ const auto azs = al::span{azCounts}.first<MAX_FD_COUNT>();
return PrepareHrirData({distances, fi}, evCounts, azs, hData);
}
diff --git a/utils/makemhr/makemhr.h b/utils/makemhr/makemhr.h
index 13b5b2d1..aa18134d 100644
--- a/utils/makemhr/makemhr.h
+++ b/utils/makemhr/makemhr.h
@@ -113,12 +113,12 @@ void MagnitudeResponse(const uint n, const complex_d *in, double *out);
// Performs a forward FFT.
inline void FftForward(const uint n, complex_d *inout)
-{ forward_fft(al::as_span(inout, n)); }
+{ forward_fft(al::span{inout, n}); }
// Performs an inverse FFT.
inline void FftInverse(const uint n, complex_d *inout)
{
- inverse_fft(al::as_span(inout, n));
+ inverse_fft(al::span{inout, n});
double f{1.0 / n};
for(uint i{0};i < n;i++)
inout[i] *= f;