Răsfoiți Sursa

debugger: Warn if we reach an unreachable format

Sam Spilsbury 10 ani în urmă
părinte
comite
2850a22359
1 a modificat fișierele cu 6 adăugiri și 0 ștergeri
  1. 6 0
      src/citra_qt/debugger/graphics_framebuffer.cpp

+ 6 - 0
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<int>(format));
     }
 }