Fix default cases in Color.c

This commit is contained in:
blankhex committed 2026-07-21 19:02:24 +03:00
1 parent 41b0be7765
commit 15dabe30f2
1 file changed
+6
+6
View File
@@ -238,6 +238,8 @@ static void hsvToHsl(const CgeColor *color, CgeColor *out) {
void CgeColorToRGBA(const CgeColor *color, CgeColor *out) { void CgeColorToRGBA(const CgeColor *color, CgeColor *out) {
switch (color->type) { switch (color->type) {
default:
/* fallthrough */
case CGE_COLOR_RGBA: case CGE_COLOR_RGBA:
*out = *color; *out = *color;
break; break;
@@ -259,6 +261,8 @@ void CgeColorToHSVA(const CgeColor *color, CgeColor *out) {
rgbToHsv(color, out); rgbToHsv(color, out);
break; break;
default:
/* fallthrough */
case CGE_COLOR_HSVA: case CGE_COLOR_HSVA:
*out = *color; *out = *color;
break; break;
@@ -279,6 +283,8 @@ void CgeColorToHSLA(const CgeColor *color, CgeColor *out) {
hsvToHsl(color, out); hsvToHsl(color, out);
break; break;
default:
/* fallthrough */
case CGE_COLOR_HSLA: case CGE_COLOR_HSLA:
*out = *color; *out = *color;
break; break;