@@ -290,7 +290,6 @@ void simplecpp::Token::printOut() const
290290 std::cout << std::endl;
291291}
292292
293- // cppcheck-suppress noConstructor - we call init() in the inherited to initialize the private members
294293class simplecpp ::TokenList::Stream {
295294public:
296295 virtual ~Stream () = default ;
@@ -424,7 +423,7 @@ class simplecpp::TokenList::Stream {
424423 return 0 ;
425424 }
426425
427- unsigned short bom;
426+ unsigned short bom{ 0 } ;
428427
429428 /* * characters that are read but not used yet. The next character is at the back. */
430429 std::string buffer;
@@ -435,13 +434,12 @@ class simplecpp::TokenList::Stream {
435434 /* * get() has returned EOF */
436435 bool inputEnd{false };
437436protected:
438- bool isUtf16;
437+ bool isUtf16{ false } ;
439438};
440439
441440namespace {
442- class StdIStream : public simplecpp ::TokenList::Stream {
441+ class StdIStream final : public simplecpp::TokenList::Stream {
443442 public:
444- // cppcheck-suppress uninitDerivedMemberVar - we call Stream::init() to initialize the private members
445443 explicit StdIStream (std::istream &istr)
446444 : istr(istr) {
447445 assert (istr.good ());
@@ -463,9 +461,8 @@ namespace {
463461 std::istream &istr;
464462 };
465463
466- class StdCharBufStream : public simplecpp ::TokenList::Stream {
464+ class StdCharBufStream final : public simplecpp::TokenList::Stream {
467465 public:
468- // cppcheck-suppress uninitDerivedMemberVar - we call Stream::init() to initialize the private members
469466 StdCharBufStream (const unsigned char * str, std::size_t size)
470467 : str(str)
471468 , size(size)
@@ -494,12 +491,11 @@ namespace {
494491 std::size_t pos{};
495492 };
496493
497- class FileStream : public simplecpp ::TokenList::Stream {
494+ class FileStream final : public simplecpp::TokenList::Stream {
498495 public:
499496 /* *
500497 * @throws simplecpp::Output thrown if file is not found
501498 */
502- // cppcheck-suppress uninitDerivedMemberVar - we call Stream::init() to initialize the private members
503499 explicit FileStream (const std::string &filename, std::vector<std::string> &files)
504500 : file(fopen(filename.c_str(), "rb"))
505501 {
0 commit comments