let the compiler -Wswitch catch unhandled shop_string types

This commit is contained in:
nhmall
2024-05-07 12:24:57 -04:00
parent fce82ac0f3
commit 93a44c05d1
+16 -2
View File
@@ -3408,9 +3408,10 @@ staticfn const char *
shop_string(int rtype) shop_string(int rtype)
{ {
const char *str = "shop"; /* catchall */ const char *str = "shop"; /* catchall */
enum roomtype_types ertype = rtype;
/* Yuck, redundancy...but shclass.name doesn't cut it as a noun */ /* Yuck, redundancy...but shclass.name doesn't cut it as a noun */
switch (rtype) { switch (ertype) {
case SHOPBASE - 1: case SHOPBASE - 1:
str = "untended shop"; str = "untended shop";
break; /* see recalc_mapseen */ break; /* see recalc_mapseen */
@@ -3447,7 +3448,20 @@ shop_string(int rtype)
case CANDLESHOP: case CANDLESHOP:
str = "lighting shop"; str = "lighting shop";
break; break;
default: /* non-shops room types */
case OROOM:
case THEMEROOM:
case COURT:
case SWAMP:
case VAULT:
case BEEHIVE:
case MORGUE:
case BARRACKS:
case ZOO:
case DELPHI:
case TEMPLE:
case LEPREHALL:
case COCKNEST:
break; break;
} }
return str; return str;