From 2850a223592edad677e2fcd31a5f53b057c4ecc8 Mon Sep 17 00:00:00 2001 From: Sam Spilsbury Date: Sun, 27 Mar 2016 12:02:22 +0800 Subject: debugger: Warn if we reach an unreachable format --- src/citra_qt/debugger/graphics_framebuffer.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/citra_qt/debugger/graphics_framebuffer.cpp') diff --git a/src/citra_qt/debugger/graphics_framebuffer.cpp b/src/citra_qt/debugger/graphics_framebuffer.cpp index c30e75933..68cff78b2 100644 --- a/src/citra_qt/debugger/graphics_framebuffer.cpp +++ b/src/citra_qt/debugger/graphics_framebuffer.cpp @@ -346,5 +346,11 @@ u32 GraphicsFramebufferWidget::BytesPerPixel(GraphicsFramebufferWidget::Format f case Format::RGBA4: case Format::D16: return 2; + default: + UNREACHABLE_MSG("GraphicsFramebufferWidget::BytesPerPixel: this " + "should not be reached as this function should " + "be given a format which is in " + "GraphicsFramebufferWidget::Format. Instead got %i", + static_cast(format)); } } -- cgit v1.2.3