]> git.tdb.fi Git - libs/gl.git/commitdiff
Simplification in get_sized_pixelformat
authorMikko Rasa <tdb@tdb.fi>
Mon, 4 Dec 2017 11:09:37 +0000 (13:09 +0200)
committerMikko Rasa <tdb@tdb.fi>
Mon, 4 Dec 2017 11:09:37 +0000 (13:09 +0200)
This switch block got overlooked when I introduced
get_unsized_pixelformat.

source/pixelformat.cpp

index e915e92fa61160908f8639828ffac60c89b893a7..6655c6b22c3b3205e06be0bbe338e643209d2da9 100644 (file)
@@ -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)
        {