Browse Source
Explicitly delete the copy constructors and copy assignment operators for ChannelAnalyzerSink and its nested RRCHelper class. These classes manage resources that should not be shared through implicit shallow copies. The compiler-generated copy operations could leave multiple objects referring to the same resources, potentially causing invalid ownership or double deletion. Since neither class is intended to be copied or assigned, prohibit both operations at compile time, turning potential runtime errors into compile-time errors. 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
1 changed files with 5 additions and 1 deletions
Loading…
Reference in new issue