summaryrefslogtreecommitdiffstats
path: root/src/Protocol
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/Protocol/ChunkDataSerializer.cpp1
-rw-r--r--src/Protocol/Protocol_1_10.cpp7
-rw-r--r--src/Protocol/Protocol_1_11.cpp7
-rw-r--r--src/Protocol/Protocol_1_12.cpp6
-rw-r--r--src/Protocol/Protocol_1_13.cpp10
-rw-r--r--src/Protocol/Protocol_1_8.cpp9
-rw-r--r--src/Protocol/Protocol_1_9.cpp5
7 files changed, 10 insertions, 35 deletions
diff --git a/src/Protocol/ChunkDataSerializer.cpp b/src/Protocol/ChunkDataSerializer.cpp
index 2c45eea58..ec7fa6648 100644
--- a/src/Protocol/ChunkDataSerializer.cpp
+++ b/src/Protocol/ChunkDataSerializer.cpp
@@ -118,7 +118,6 @@ void cChunkDataSerializer::SendToClients(const int a_ChunkX, const int a_ChunkZ,
continue;
}
}
-
UNREACHABLE("Unknown chunk data serialization version");
}
diff --git a/src/Protocol/Protocol_1_10.cpp b/src/Protocol/Protocol_1_10.cpp
index b3a3205d5..89bc3f010 100644
--- a/src/Protocol/Protocol_1_10.cpp
+++ b/src/Protocol/Protocol_1_10.cpp
@@ -1053,7 +1053,7 @@ void cProtocol_1_10_0::WriteMobMetadata(cPacketizer & a_Pkt, const cMonster & a_
case mtZombieHorse:
{
// Todo: Mobs not added yet. Grouped ones have the same metadata
- UNREACHABLE("cProtocol_1_10::WriteMobMetadata: received unimplemented type");
+ ASSERT(!"cProtocol_1_10::WriteMobMetadata: received unimplemented type");
break;
}
@@ -1072,10 +1072,7 @@ void cProtocol_1_10_0::WriteMobMetadata(cPacketizer & a_Pkt, const cMonster & a_
// Entities without additional metadata
break;
}
- case mtInvalidType:
- {
- break;
- }
+
default: UNREACHABLE("cProtocol_1_10::WriteMobMetadata: received mob of invalid type");
} // switch (a_Mob.GetType())
}
diff --git a/src/Protocol/Protocol_1_11.cpp b/src/Protocol/Protocol_1_11.cpp
index ff0c34223..c8ba78e62 100644
--- a/src/Protocol/Protocol_1_11.cpp
+++ b/src/Protocol/Protocol_1_11.cpp
@@ -1241,7 +1241,7 @@ void cProtocol_1_11_0::WriteMobMetadata(cPacketizer & a_Pkt, const cMonster & a_
case mtVindicator:
{
// Todo: Mobs not added yet. Grouped ones have the same metadata
- UNREACHABLE("cProtocol_1_11::WriteMobMetadata: received unimplemented type");
+ ASSERT(!"cProtocol_1_11::WriteMobMetadata: received unimplemented type");
break;
}
@@ -1260,10 +1260,7 @@ void cProtocol_1_11_0::WriteMobMetadata(cPacketizer & a_Pkt, const cMonster & a_
// Mobs without additional metadata
break;
}
- case mtInvalidType:
- {
- break;
- }
+
default: UNREACHABLE("cProtocol_1_11::WriteMobMetadata: received mob of invalid type");
} // switch (a_Mob.GetType())
}
diff --git a/src/Protocol/Protocol_1_12.cpp b/src/Protocol/Protocol_1_12.cpp
index e4ce9a942..81f81dc1c 100644
--- a/src/Protocol/Protocol_1_12.cpp
+++ b/src/Protocol/Protocol_1_12.cpp
@@ -957,7 +957,7 @@ void cProtocol_1_12::WriteMobMetadata(cPacketizer & a_Pkt, const cMonster & a_Mo
case mtVindicator:
{
// Todo: Mobs not added yet. Grouped ones have the same metadata
- UNREACHABLE("cProtocol_1_12::WriteMobMetadata: received unimplemented type");
+ ASSERT(!"cProtocol_1_12::WriteMobMetadata: received unimplemented type");
break;
}
@@ -970,10 +970,6 @@ void cProtocol_1_12::WriteMobMetadata(cPacketizer & a_Pkt, const cMonster & a_Mo
break;
}
- case mtInvalidType:
- {
- break;
- }
default: UNREACHABLE("cProtocol_1_12::WriteMobMetadata: received mob of invalid type");
} // switch (a_Mob.GetType())
}
diff --git a/src/Protocol/Protocol_1_13.cpp b/src/Protocol/Protocol_1_13.cpp
index dbfd51d59..afb0a9cc9 100644
--- a/src/Protocol/Protocol_1_13.cpp
+++ b/src/Protocol/Protocol_1_13.cpp
@@ -463,7 +463,6 @@ UInt32 cProtocol_1_13::GetProtocolMobType(eMonsterType a_MobType)
case mtZombiePigman: return 53;
case mtZombieHorse: return 88;
case mtZombieVillager: return 89;
-
default: return 0;
}
UNREACHABLE("Unsupported mob type");
@@ -599,7 +598,6 @@ UInt8 cProtocol_1_13::GetEntityMetadataID(EntityMetadata a_Metadata)
case EntityMetadata::AbstractSkeletonArmsSwinging:
case EntityMetadata::ZombieUnusedWasType: break;
}
-
UNREACHABLE("Retrieved invalid metadata for protocol");
}
@@ -631,7 +629,6 @@ UInt8 cProtocol_1_13::GetEntityMetadataID(EntityMetadataType a_FieldType)
case EntityMetadataType::OptVarInt: return 17;
case EntityMetadataType::Pose: return 18;
}
-
UNREACHABLE("Translated invalid metadata type for protocol");
}
@@ -1307,10 +1304,9 @@ void cProtocol_1_13::WriteMobMetadata(cPacketizer & a_Pkt, const cMonster & a_Mo
case mtVindicator:
case mtHusk:
-
{
// Todo: Mobs not added yet. Grouped ones have the same metadata
- UNREACHABLE("cProtocol_1_13::WriteMobMetadata: received unimplemented type");
+ ASSERT(!"cProtocol_1_13::WriteMobMetadata: received unimplemented type");
break;
}
@@ -1331,10 +1327,6 @@ void cProtocol_1_13::WriteMobMetadata(cPacketizer & a_Pkt, const cMonster & a_Mo
break;
}
- case mtInvalidType:
- {
- break;
- }
default: UNREACHABLE("cProtocol_1_13::WriteMobMetadata: received mob of invalid type");
} // switch (a_Mob.GetType())
}
diff --git a/src/Protocol/Protocol_1_8.cpp b/src/Protocol/Protocol_1_8.cpp
index 003fc75e2..91c132c8b 100644
--- a/src/Protocol/Protocol_1_8.cpp
+++ b/src/Protocol/Protocol_1_8.cpp
@@ -3848,7 +3848,7 @@ void cProtocol_1_8_0::WriteMobMetadata(cPacketizer & a_Pkt, const cMonster & a_M
case mtZombieHorse:
{
// Todo: Mobs not added yet. Grouped ones have the same metadata
- UNREACHABLE("cProtocol_1_8::WriteMobMetadata: received unimplemented type");
+ ASSERT(!"cProtocol_1_8::WriteMobMetadata: received unimplemented type");
break;
}
@@ -3865,10 +3865,7 @@ void cProtocol_1_8_0::WriteMobMetadata(cPacketizer & a_Pkt, const cMonster & a_M
// Allowed mobs without additional metadata
break;
}
- case mtInvalidType:
- {
- break;
- }
+
default: UNREACHABLE("cProtocol_1_8::WriteMobMetadata: received mob of invalid type");
} // switch (a_Mob.GetType())
}
@@ -4029,7 +4026,7 @@ UInt8 cProtocol_1_8_0::GetProtocolEntityType(const cEntity & a_Entity)
case Type::etPlayer:
case Type::etMonster:
case Type::etExpOrb:
- case Type::etPainting: UNREACHABLE("Tried to spawn an unhandled entity");
+ case Type::etPainting: break;
}
UNREACHABLE("Unhandled entity kind");
}
diff --git a/src/Protocol/Protocol_1_9.cpp b/src/Protocol/Protocol_1_9.cpp
index e2396ce0e..5506aec1a 100644
--- a/src/Protocol/Protocol_1_9.cpp
+++ b/src/Protocol/Protocol_1_9.cpp
@@ -2150,7 +2150,7 @@ void cProtocol_1_9_0::WriteMobMetadata(cPacketizer & a_Pkt, const cMonster & a_M
case mtShulker:
{
// Todo: Mobs not added yet. Grouped ones have the same metadata
- UNREACHABLE("cProtocol_1_9::WriteMobMetadata: received unimplemented type");
+ ASSERT(!"cProtocol_1_9::WriteMobMetadata: received unimplemented type");
break;
}
@@ -2167,10 +2167,7 @@ void cProtocol_1_9_0::WriteMobMetadata(cPacketizer & a_Pkt, const cMonster & a_M
// Entities without additional metadata
break;
}
- case mtInvalidType:
- {
- }
default: UNREACHABLE("cProtocol_1_9::WriteMobMetadata: received mob of invalid type");
} // switch (a_Mob.GetType())
}