Browse Source

ft8/ft8 : Initialize uninitialized constructor members

Initialize pass_, hack_0_, and hack_1_ in the FT8 constructor
initializer list.

cppcheck identified these members as potentially uninitialized.
Initializing them makes the constructor state explicit and reduces
the risk of undefined behavior if they are read before being assigned.

Signed-off-by: Robin Getz <rgetz503@gmail.com>
chirpmodem-v8.0.0
Robin Getz 2 months ago
parent
commit
6fa5812a69
No known key found for this signature in database
GPG Key ID: 51C7231FFED0E060
  1. 5
      ft8/ft8.cpp

5
ft8/ft8.cpp

@ -84,7 +84,10 @@ FT8::FT8( @@ -84,7 +84,10 @@ FT8::FT8(
CallbackInterface *cb,
const std::vector<cdecode> &prevdecs,
FFTEngine *fftEngine
)
):
pass_(0),
hack_0_(0.0f),
hack_1_(0.0f)
{
samples_ = samples;
min_hz_ = min_hz;

Loading…
Cancel
Save