code quality: made unused switch cases more obvious

pull/1/head
Michael Ochmann 2 years ago
parent 4d7a7bfd69
commit 425a0f0b66
  1. 2
      src/QR.cpp
  2. 2
      src/QR.hpp

@ -31,7 +31,7 @@ void QR::render(Format format) {
case Format::SVG : this->renderTyped<SVGRenderer>(); break; case Format::SVG : this->renderTyped<SVGRenderer>(); break;
case Format::JPG : this->renderTyped<JPGRenderer>(); break; case Format::JPG : this->renderTyped<JPGRenderer>(); break;
case Format::BMP : this->renderTyped<BMPRenderer>(); break; case Format::BMP : this->renderTyped<BMPRenderer>(); break;
case Format::END : break; UNUSED_CASE(Format::END);
} }
} }

@ -6,6 +6,8 @@
#include "qrcodegen.hpp" #include "qrcodegen.hpp"
#include "Renderer.hpp" #include "Renderer.hpp"
#define UNUSED_CASE(name) case name: break;
namespace massivedynamic { namespace massivedynamic {
typedef uint32_t Color; typedef uint32_t Color;

Loading…
Cancel
Save