diff options
Diffstat (limited to '')
-rw-r--r-- | src/Mobs/CMakeLists.txt | 4 | ||||
-rw-r--r-- | src/Mobs/Monster.cpp | 16 |
2 files changed, 10 insertions, 10 deletions
diff --git a/src/Mobs/CMakeLists.txt b/src/Mobs/CMakeLists.txt index 55ae36e1e..08df07d71 100644 --- a/src/Mobs/CMakeLists.txt +++ b/src/Mobs/CMakeLists.txt @@ -81,10 +81,6 @@ SET (HDRS Zombie.h ZombiePigman.h) -if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") - set_source_files_properties(Monster.cpp PROPERTIES COMPILE_FLAGS "-Wno-error=switch -Wno-error=switch-enum") -endif() - if(NOT MSVC) add_library(Mobs ${SRCS} ${HDRS}) endif() diff --git a/src/Mobs/Monster.cpp b/src/Mobs/Monster.cpp index 944e8aa94..2ff1f74d8 100644 --- a/src/Mobs/Monster.cpp +++ b/src/Mobs/Monster.cpp @@ -1034,10 +1034,12 @@ cMonster::eFamily cMonster::FamilyFromType(eMonsterType a_Type) case mtZombie: return mfHostile; case mtZombiePigman: return mfHostile; - case mtInvalidType: break; + default: + { + ASSERT(!"Unhandled mob type"); + return mfUnhandled; + } } - ASSERT(!"Unhandled mob type"); - return mfUnhandled; } @@ -1053,10 +1055,12 @@ int cMonster::GetSpawnDelay(cMonster::eFamily a_MobFamily) case mfAmbient: return 40; case mfWater: return 400; case mfNoSpawn: return -1; - case mfUnhandled: break; + default: + { + ASSERT(!"Unhandled mob family"); + return -1; + } } - ASSERT(!"Unhandled mob family"); - return -1; } |