Browse Source

demoddatv/leansdr: Prevent unsafe copying of DVB-S2 processing classes

Explicitly delete the copy constructors and copy assignment operators for
s2_frame_receiver and s2_fecdec_soft.

These processing classes manage state and resources that should not be
duplicated through implicit shallow copies. Prohibiting copying and
assignment prevents accidental duplication of internal state and
potentially unsafe resource ownership.

cppcheck identified the missing copy constructors and assignment operators
with its noCopyConstructor and noOperatorEq warnings.

Signed-off-by: Robin Getz <rgetz503@gmail.com>
chirpmodem-v8.0.0
Robin Getz 1 month ago
parent
commit
cdeaf71f6d
No known key found for this signature in database
GPG Key ID: 51C7231FFED0E060
  1. 6
      plugins/channelrx/demoddatv/leansdr/dvbs2.h

6
plugins/channelrx/demoddatv/leansdr/dvbs2.h

@ -675,6 +675,9 @@ struct s2_frame_receiver : runnable @@ -675,6 +675,9 @@ struct s2_frame_receiver : runnable
}
}
s2_frame_receiver(const s2_frame_receiver&) = delete;
s2_frame_receiver& operator=(const s2_frame_receiver&) = delete;
enum {
FRAME_DETECT, // Looking for PLHEADER
FRAME_PROBE, // Aligned with PLHEADER, ready to recover carrier
@ -3136,6 +3139,9 @@ struct s2_fecdec_soft : runnable @@ -3136,6 +3139,9 @@ struct s2_fecdec_soft : runnable
}
}
s2_fecdec_soft(const s2_fecdec_soft&) = delete;
s2_fecdec_soft& operator=(const s2_fecdec_soft&) = delete;
void run()
{
while (in.readable() >= 1 &&

Loading…
Cancel
Save