1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2026-08-10 21:43:31 -04:00

modais: Initialize remaining AISModSource members

Cppcheck reported several AISModSource members that were not initialized
by the constructor. Initialize the remaining scalar members in the
constructor initializer list to establish a well-defined initial state
and avoid undefined behavior if they are accessed before being assigned.

Reported by cppcheck.

Signed-off-by: Robin Getz <rgetz503@gmail.com>
This commit is contained in:
Robin Getz
2026-08-02 18:52:10 -04:00
parent f6ed9b8cb3
commit 862e838b65
@@ -35,9 +35,16 @@ AISModSource::AISModSource() :
m_scopeSink(nullptr),
m_magsq(0.0),
m_levelCalcCount(0),
m_rmsLevel(0.0),
m_peakLevelOut(0.0),
m_peakLevel(0.0f),
m_levelSum(0.0f),
m_sampleIdx(0),
m_pow(0.0f),
m_powRamp(0.0f),
m_state(idle),
m_waitCounter(0),
m_nrziBit(0),
m_byteIdx(0),
m_bitIdx(0),
m_last5Bits(0),