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

@@ -1351,8 +1351,8 @@ static inline bool ep_compile_pass_shader(struct effect_parser *ep,
dstr_cat(&location, " (Vertex ");
else if (type == SHADER_PIXEL)
dstr_cat(&location, " (Pixel ");
else if (type == SHADER_GEOMETRY)
dstr_cat(&location, " (Geometry ");
/*else if (type == SHADER_GEOMETRY)
dstr_cat(&location, " (Geometry ");*/
dstr_catf(&location, "shader, technique %s, pass %u)", tech->name,
pass_idx);

View File

@@ -287,7 +287,6 @@ struct shader_param_info {
enum shader_type {
SHADER_VERTEX,
SHADER_PIXEL,
SHADER_GEOMETRY
};
EXPORT void shader_destroy(shader_t shader);
@@ -681,9 +680,10 @@ static inline uint32_t gs_get_format_bpp(enum gs_color_format format)
case GS_DXT1: return 4;
case GS_DXT3: return 8;
case GS_DXT5: return 8;
default:
case GS_UNKNOWN: return 0;
}
return 0;
}
static inline bool gs_is_compressed_format(enum gs_color_format format)

View File

@@ -86,9 +86,10 @@ static inline uint32_t get_audio_channels(enum speaker_setup speakers)
case SPEAKERS_5POINT1_SURROUND: return 6;
case SPEAKERS_7POINT1: return 8;
case SPEAKERS_7POINT1_SURROUND: return 8;
default:
case SPEAKERS_UNKNOWN: return 0;
}
return 0;
}
static inline size_t get_audio_bytes_per_channel(enum audio_type type)
@@ -99,9 +100,10 @@ static inline size_t get_audio_bytes_per_channel(enum audio_type type)
case AUDIO_FORMAT_24BIT: return 3;
case AUDIO_FORMAT_FLOAT:
case AUDIO_FORMAT_32BIT: return 4;
default:
case AUDIO_FORMAT_UNKNOWN: return 0;
}
return 0;
}
static inline size_t get_audio_size(enum audio_type type,