From 85d5a8fdbafb34e846624d66691276b902745a7c Mon Sep 17 00:00:00 2001 From: GullCode Date: Thu, 21 Apr 2022 22:27:20 +0200 Subject: [PATCH] Fix for weffc++ --- firmware/application/ui/ui_qrcode.cpp | 17 +++++++++++++++++ firmware/application/ui/ui_qrcode.hpp | 7 +++++-- 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/firmware/application/ui/ui_qrcode.cpp b/firmware/application/ui/ui_qrcode.cpp index f824b151..736ef441 100644 --- a/firmware/application/ui/ui_qrcode.cpp +++ b/firmware/application/ui/ui_qrcode.cpp @@ -43,8 +43,25 @@ QRCodeImage::QRCodeImage( } +QRCodeImage::~QRCodeImage( ) +{ + +} + +QRCodeImage::QRCodeImage(const QRCodeImage&Image) : Widget { } +{ + (void)Image; +} + +QRCodeImage & QRCodeImage::operator=(const QRCodeImage&Image) +{ + (void)Image; + return *this; +} + void QRCodeImage::paint(Painter& painter) { + (void)painter ; // The structure to manage the QR code QRCode qrcode; diff --git a/firmware/application/ui/ui_qrcode.hpp b/firmware/application/ui/ui_qrcode.hpp index 4d110775..d30b7715 100644 --- a/firmware/application/ui/ui_qrcode.hpp +++ b/firmware/application/ui/ui_qrcode.hpp @@ -40,10 +40,13 @@ public: qr_text_ = qr_text; } void paint(Painter& painter) override; - + // for -weffc++ to be killed + ~QRCodeImage(); // destructor + QRCodeImage(const QRCodeImage&Image); + QRCodeImage & operator=(const QRCodeImage &Image); // assignment private: - const char * qr_text_ ; + const char * qr_text_ = NULL ; }; class QRCodeView : public View {