avoid using 'default' for enum switches

This commit is contained in:
jp9000
2013-10-24 01:29:06 -07:00
parent 8421690c33
commit bb329b9278
9 changed files with 71 additions and 41 deletions

View File

@@ -39,7 +39,7 @@ struct gl_platform {
/* For now, only support basic 32bit formats for graphics output. */
static inline int get_color_format_bits(enum gs_color_format format)
{
switch (format) {
switch ((uint32_t)format) {
case GS_RGBA:
return 32;
default:
@@ -49,7 +49,7 @@ static inline int get_color_format_bits(enum gs_color_format format)
static inline int get_depth_format_bits(enum gs_zstencil_format zsformat)
{
switch (zsformat) {
switch ((uint32_t)zsformat) {
case GS_Z16:
return 16;
case GS_Z24_S8:
@@ -61,7 +61,7 @@ static inline int get_depth_format_bits(enum gs_zstencil_format zsformat)
static inline int get_stencil_format_bits(enum gs_zstencil_format zsformat)
{
switch (zsformat) {
switch ((uint32_t)zsformat) {
case GS_Z24_S8:
return 8;
default: