From 425a0f0b665cbfa761558ce6fa90168e14e1bd86 Mon Sep 17 00:00:00 2001 From: Michael Ochmann Date: Sun, 26 Feb 2023 17:15:16 +0100 Subject: [PATCH] code quality: made unused switch cases more obvious --- src/QR.cpp | 2 +- src/QR.hpp | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/QR.cpp b/src/QR.cpp index 7cee284..5be5764 100644 --- a/src/QR.cpp +++ b/src/QR.cpp @@ -31,7 +31,7 @@ void QR::render(Format format) { case Format::SVG : this->renderTyped(); break; case Format::JPG : this->renderTyped(); break; case Format::BMP : this->renderTyped(); break; - case Format::END : break; + UNUSED_CASE(Format::END); } } diff --git a/src/QR.hpp b/src/QR.hpp index edcc80d..df9f4e7 100644 --- a/src/QR.hpp +++ b/src/QR.hpp @@ -6,6 +6,8 @@ #include "qrcodegen.hpp" #include "Renderer.hpp" +#define UNUSED_CASE(name) case name: break; + namespace massivedynamic { typedef uint32_t Color;