optimise switch of nbt_prim_tagsize

had duplicate switch branches, which wastes binary size.
This commit is contained in:
2025-07-23 12:14:03 +02:00
parent 9fd920908e
commit 5d7c244c8f

View File

@@ -91,9 +91,9 @@ int nbt_prim_tagsize(u8 tag) {
switch (tag) { switch (tag) {
case NBT_I8: return 1; case NBT_I8: return 1;
case NBT_I16: return 2; case NBT_I16: return 2;
case NBT_I32: return 4; case NBT_I32:
case NBT_I64: return 8;
case NBT_F32: return 4; case NBT_F32: return 4;
case NBT_I64:
case NBT_F64: return 8; case NBT_F64: return 8;
default: return -1; default: return -1;
} }