mirror of
https://github.com/f4exb/sdrangel.git
synced 2026-08-07 11:26:09 -04:00
fe22e92c29
Replace raw memset() initialization of hist with C++ value initialization.
This avoids bypassing std::complex object initialization and ensures the
history buffer contains valid constructed objects when HIST_FLOAT is enabled.
The previous memset() relied on the in-memory representation of
std::complex<float> and could leave non-trivial objects improperly
initialized. While this typically behaved as expected with common
implementations, it was not valid C++ object initialization.
pointed out by cppcheck as:
Using 'memset' on struct that contains a 'std::complex'
Signed-off-by: Robin Getz <rgetz503@gmail.com>