1
0

Fix switch warnings (#4013)

* Fix switch warnings
  * Fix a variety of -Wswitch and -Wswitch-enum warnings
  * Remove unneeded -Wno-error flags

* Reorganise some eMonsterType switches
  * Alpha sort eMonsterType cases in WriteMobMetadata
    and in cNBTChunkSerializer::AddMonsterEntity
  * List all mob types in protocol 1.12 and NBTChunkSerializer

* cStructGenTrees::GetNumTrees: remove switch default

* cWSSAnvil::LoadOldMinecartFromNBT: Log unhandled minecart type
This commit is contained in:
peterbell10
2017-09-14 09:48:57 +01:00
committed by Alexander Harkness
parent e24186bb13
commit 307e7aaff5
24 changed files with 357 additions and 322 deletions

View File

@@ -1235,8 +1235,11 @@ bool cSlotAreaBeacon::IsPlaceableItem(short a_ItemType)
{
return true;
}
default:
{
return false;
}
}
return false;
}
@@ -2406,8 +2409,8 @@ bool cSlotAreaArmor::CanPlaceArmorInSlot(int a_SlotNum, const cItem & a_Item)
case 1: return ItemCategory::IsChestPlate(a_Item.m_ItemType);
case 2: return ItemCategory::IsLeggings(a_Item.m_ItemType);
case 3: return ItemCategory::IsBoots(a_Item.m_ItemType);
default: return false;
}
return false;
}