From: Mikko Rasa Date: Mon, 4 Dec 2017 11:09:37 +0000 (+0200) Subject: Simplification in get_sized_pixelformat X-Git-Url: http://git.tdb.fi/?p=libs%2Fgl.git;a=commitdiff_plain;h=ee1da735a016a4df724fb18e60dec6a6f9bf3d6e Simplification in get_sized_pixelformat This switch block got overlooked when I introduced get_unsized_pixelformat. --- 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) {