From e2123689652376acc0a4f3238332e31e0fa95edf Mon Sep 17 00:00:00 2001 From: Uleat Date: Fri, 22 Apr 2016 20:51:22 -0400 Subject: [PATCH] Revert (and proper fix) of 'size_t' issue (sneaky little gcc 4.6'es) --- common/client_version.h | 4 +++- common/emu_legacy.h | 15 ++++++--------- common/inventory_version.h | 2 +- 3 files changed, 10 insertions(+), 11 deletions(-) diff --git a/common/client_version.h b/common/client_version.h index 7483f6be2..86d9ebcab 100644 --- a/common/client_version.h +++ b/common/client_version.h @@ -22,6 +22,8 @@ #include "types.h" +#include + namespace EQEmu { @@ -60,7 +62,7 @@ namespace EQEmu }; static const ClientVersion LastClientVersion = ClientVersion::RoF2; - static const unsigned int ClientVersionCount = 8; //(static_cast(LastClientVersion) + 1); - travis either doesn't like this or decl 'size_t' + static const size_t ClientVersionCount = (static_cast(LastClientVersion) + 1); extern bool IsValidClientVersion(ClientVersion client_version); extern ClientVersion ValidateClientVersion(ClientVersion client_version); diff --git a/common/emu_legacy.h b/common/emu_legacy.h index 9fe14af8d..f8d4ea6b4 100644 --- a/common/emu_legacy.h +++ b/common/emu_legacy.h @@ -22,6 +22,8 @@ #include "types.h" +#include + namespace EQEmu { @@ -260,18 +262,13 @@ namespace EQEmu static const uint16 ITEM_CONTAINER_SIZE = 10;//Titanium::consts::ITEM_CONTAINER_SIZE; // BANDOLIERS_SIZE sets maximum limit..active limit will need to be handled by the appropriate AA or spell (or item?) - //static const size_t BANDOLIERS_SIZE = 20;//RoF2::consts::BANDOLIERS_SIZE; // number of bandolier instances - static const unsigned int BANDOLIERS_SIZE = 20;//RoF2::consts::BANDOLIERS_SIZE; // number of bandolier instances - - //static const size_t BANDOLIER_ITEM_COUNT = 4;//RoF2::consts::BANDOLIER_ITEM_COUNT; // number of equipment slots in bandolier instance - static const unsigned int BANDOLIER_ITEM_COUNT = 4;//RoF2::consts::BANDOLIER_ITEM_COUNT; // number of equipment slots in bandolier instance + static const size_t BANDOLIERS_SIZE = 20;//RoF2::consts::BANDOLIERS_SIZE; // number of bandolier instances + static const size_t BANDOLIER_ITEM_COUNT = 4;//RoF2::consts::BANDOLIER_ITEM_COUNT; // number of equipment slots in bandolier instance // POTION_BELT_SIZE sets maximum limit..active limit will need to be handled by the appropriate AA or spell (or item?) - //static const size_t POTION_BELT_ITEM_COUNT = 5;//RoF2::consts::POTION_BELT_ITEM_COUNT; - static const unsigned int POTION_BELT_ITEM_COUNT = 5;//RoF2::consts::POTION_BELT_ITEM_COUNT; + static const size_t POTION_BELT_ITEM_COUNT = 5;//RoF2::consts::POTION_BELT_ITEM_COUNT; - //static const size_t TEXT_LINK_BODY_LENGTH = 56;//RoF2::consts::TEXT_LINK_BODY_LENGTH; - static const unsigned int TEXT_LINK_BODY_LENGTH = 56;//RoF2::consts::TEXT_LINK_BODY_LENGTH; + static const size_t TEXT_LINK_BODY_LENGTH = 56;//RoF2::consts::TEXT_LINK_BODY_LENGTH; } } diff --git a/common/inventory_version.h b/common/inventory_version.h index 061011c6a..07ad991ff 100644 --- a/common/inventory_version.h +++ b/common/inventory_version.h @@ -44,7 +44,7 @@ namespace EQEmu static const InventoryVersion LastInventoryVersion = InventoryVersion::Pet; static const InventoryVersion LastPCInventoryVersion = InventoryVersion::RoF2; static const InventoryVersion LastNonPCInventoryVersion = InventoryVersion::Pet; - static const unsigned int InventoryVersionCount = 12; //(static_cast(LastInventoryVersion) + 1); - travis either doesn't like this or decl 'size_t' + static const size_t InventoryVersionCount = (static_cast(LastInventoryVersion) + 1); extern bool IsValidInventoryVersion(InventoryVersion inventory_version); extern bool IsValidPCInventoryVersion(InventoryVersion inventory_version);