From ee1da735a016a4df724fb18e60dec6a6f9bf3d6e Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Mon, 4 Dec 2017 13:09:37 +0200 Subject: [PATCH] Simplification in get_sized_pixelformat This switch block got overlooked when I introduced get_unsized_pixelformat. --- source/pixelformat.cpp | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/source/pixelformat.cpp b/source/pixelformat.cpp index e915e92f..6655c6b2 100644 --- a/source/pixelformat.cpp +++ b/source/pixelformat.cpp @@ -124,14 +124,7 @@ PixelFormat get_sized_pixelformat(PixelFormat pf, unsigned size) if(!size || size>4) throw invalid_argument("get_sized_pixelformat"); - switch(pf) - { - case SRGB: - case SRGB_ALPHA: break; - case SRGB8: pf = SRGB; break; - case SRGB8_ALPHA8: pf = SRGB_ALPHA; break; - default: pf = get_base_pixelformat(pf); - } + pf = get_unsized_pixelformat(pf); switch(size) { -- 2.43.0