From 79bb403089ff91c24b8356ad8d5bc5f7666a0d11 Mon Sep 17 00:00:00 2001 From: Tony Wasserka Date: Thu, 4 Dec 2014 20:41:01 +0100 Subject: More coding style fixes. --- src/video_core/pica.h | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) (limited to 'src/video_core') diff --git a/src/video_core/pica.h b/src/video_core/pica.h index c1f35a011..b463a32ef 100644 --- a/src/video_core/pica.h +++ b/src/video_core/pica.h @@ -131,16 +131,22 @@ struct Regs { }; static unsigned BytesPerPixel(TextureFormat format) { - if (format == TextureFormat::RGBA8) + switch (format) { + case TextureFormat::RGBA8: return 4; - else if (format == TextureFormat::RGB8) + + case TextureFormat::RGB8: return 3; - else if (format == TextureFormat::RGBA5551 || - format == TextureFormat::RGB565 || - format == TextureFormat::RGBA4) + + case TextureFormat::RGBA5551: + case TextureFormat::RGB565: + case TextureFormat::RGBA4: return 2; - else // placeholder + + default: + // placeholder for yet unknown formats return 1; + } } BitField< 0, 1, u32> texturing_enable; -- cgit v1.2.3