X-Git-Url: https://git.nihav.org/?p=nihav.git;a=blobdiff_plain;f=nihav-core%2Fsrc%2Fdsp%2Ffft.rs;h=ee4ab7c774b58c065a75b2263126ec40fbc9a7fb;hp=1255f6c5db0138d2299adde56a89fa97b43c4640;hb=e243ceb4d694cc08767ad70027bb6963f4cefea3;hpb=250c49f64633580d3e294a7b871fad4618694209 diff --git a/nihav-core/src/dsp/fft.rs b/nihav-core/src/dsp/fft.rs index 1255f6c..ee4ab7c 100644 --- a/nihav-core/src/dsp/fft.rs +++ b/nihav-core/src/dsp/fft.rs @@ -542,9 +542,7 @@ impl FFT { for idx in 0..self.swaps.len() { let nidx = self.swaps[idx]; if idx != nidx { - let t = data[nidx]; - data[nidx] = data[idx]; - data[idx] = t; + data.swap(nidx, idx); } } self.do_fft_core(data); @@ -553,9 +551,7 @@ impl FFT { for idx in 0..self.swaps.len() { let nidx = self.swaps[idx]; if idx != nidx { - let t = data[nidx]; - data[nidx] = data[idx]; - data[idx] = t; + data.swap(nidx, idx); } } self.do_ifft_core(data);