mirror of
https://github.com/f4exb/sdrangel.git
synced 2026-08-14 23:43:43 -04:00
DATV: Replace DVB-S2 pilot VLA buffers with std::vector
Replace variable-length arrays used for DVB-S2 pilot symbol matching with std::vector allocations. Use vector::data() when passing buffers to the existing pointer-based match_ph_amp() function. This removes non-standard VLA usage and improves C++ portability without changing behavior. Signed-off-by: Robin Getz <rgetz503@gmail.com>
This commit is contained in:
@@ -1610,13 +1610,13 @@ struct s2_frame_receiver : runnable
|
||||
|
||||
float interp_match_sof(sampler_state *pss)
|
||||
{
|
||||
std::complex<T> symbols[pilot.LENGTH];
|
||||
std::vector<std::complex<T>> symbols(pilot.LENGTH);
|
||||
|
||||
for (int i=0; i<sof.LENGTH; ++i) {
|
||||
symbols[i] = interp_next(pss) * pss->gain;
|
||||
}
|
||||
|
||||
return match_ph_amp(sof.symbols, symbols, sof.LENGTH, pss);
|
||||
return match_ph_amp(sof.symbols, symbols.data(), sof.LENGTH, pss);
|
||||
}
|
||||
|
||||
// Estimate phase and amplitude from known symbols.
|
||||
|
||||
Reference in New Issue
Block a user