mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-29 16:43:47 +00:00
refactor(src/common): remove unused imports (#19506)
* refactor(src/common): remove unused imports * fix: build * chore: fix build * chore: size_t -> std::size_t * chore: fix fuckup from previous commit * chore: fix build * chore: fix build * chore: fix build * chore: fix build with std::size_t * chore: fix build * chore: fix build * chore: fix build * chore: fix build * chore: fix build * chore: fix build * chore: fix build * chore: fix build * chore: fix build * chore: fix build * chore: fix build * chore: fix build
This commit is contained in:
@@ -480,9 +480,9 @@ bool SmartAIMgr::IsTargetValid(SmartScriptHolder const& e)
|
||||
|
||||
bool SmartAIMgr::CheckUnusedEventParams(SmartScriptHolder const& e)
|
||||
{
|
||||
size_t paramsStructSize = [&]() -> size_t
|
||||
std::size_t paramsStructSize = [&]() -> std::size_t
|
||||
{
|
||||
constexpr size_t NO_PARAMS = size_t(0);
|
||||
constexpr std::size_t NO_PARAMS = std::size_t(0);
|
||||
switch (e.event.type)
|
||||
{
|
||||
case SMART_EVENT_UPDATE_IC: return sizeof(SmartEvent::minMaxRepeat);
|
||||
@@ -584,11 +584,11 @@ bool SmartAIMgr::CheckUnusedEventParams(SmartScriptHolder const& e)
|
||||
}
|
||||
}();
|
||||
|
||||
static size_t rawCount = sizeof(SmartEvent::raw) / sizeof(uint32);
|
||||
size_t paramsCount = paramsStructSize / sizeof(uint32);
|
||||
static std::size_t rawCount = sizeof(SmartEvent::raw) / sizeof(uint32);
|
||||
std::size_t paramsCount = paramsStructSize / sizeof(uint32);
|
||||
|
||||
bool valid = true;
|
||||
for (size_t index = paramsCount; index < rawCount; index++)
|
||||
for (std::size_t index = paramsCount; index < rawCount; index++)
|
||||
{
|
||||
uint32 value = ((uint32*)&e.event.raw)[index];
|
||||
if (value != 0)
|
||||
@@ -604,9 +604,9 @@ bool SmartAIMgr::CheckUnusedEventParams(SmartScriptHolder const& e)
|
||||
|
||||
bool SmartAIMgr::CheckUnusedActionParams(SmartScriptHolder const& e)
|
||||
{
|
||||
size_t paramsStructSize = [&]() -> size_t
|
||||
std::size_t paramsStructSize = [&]() -> std::size_t
|
||||
{
|
||||
constexpr size_t NO_PARAMS = size_t(0);
|
||||
constexpr std::size_t NO_PARAMS = std::size_t(0);
|
||||
switch (e.action.type)
|
||||
{
|
||||
case SMART_ACTION_NONE: return NO_PARAMS;
|
||||
@@ -784,11 +784,11 @@ bool SmartAIMgr::CheckUnusedActionParams(SmartScriptHolder const& e)
|
||||
}
|
||||
}();
|
||||
|
||||
static size_t rawCount = sizeof(SmartAction::raw) / sizeof(uint32);
|
||||
size_t paramsCount = paramsStructSize / sizeof(uint32);
|
||||
static std::size_t rawCount = sizeof(SmartAction::raw) / sizeof(uint32);
|
||||
std::size_t paramsCount = paramsStructSize / sizeof(uint32);
|
||||
|
||||
bool valid = true;
|
||||
for (size_t index = paramsCount; index < rawCount; index++)
|
||||
for (std::size_t index = paramsCount; index < rawCount; index++)
|
||||
{
|
||||
uint32 value = ((uint32*)&e.action.raw)[index];
|
||||
if (value != 0)
|
||||
@@ -804,9 +804,9 @@ bool SmartAIMgr::CheckUnusedActionParams(SmartScriptHolder const& e)
|
||||
|
||||
bool SmartAIMgr::CheckUnusedTargetParams(SmartScriptHolder const& e)
|
||||
{
|
||||
size_t paramsStructSize = [&]() -> size_t
|
||||
std::size_t paramsStructSize = [&]() -> std::size_t
|
||||
{
|
||||
constexpr size_t NO_PARAMS = size_t(0);
|
||||
constexpr std::size_t NO_PARAMS = std::size_t(0);
|
||||
switch (e.target.type)
|
||||
{
|
||||
case SMART_TARGET_NONE: return NO_PARAMS;
|
||||
@@ -848,11 +848,11 @@ bool SmartAIMgr::CheckUnusedTargetParams(SmartScriptHolder const& e)
|
||||
}
|
||||
}();
|
||||
|
||||
static size_t rawCount = sizeof(SmartTarget::raw) / sizeof(uint32);
|
||||
size_t paramsCount = paramsStructSize / sizeof(uint32);
|
||||
static std::size_t rawCount = sizeof(SmartTarget::raw) / sizeof(uint32);
|
||||
std::size_t paramsCount = paramsStructSize / sizeof(uint32);
|
||||
|
||||
bool valid = true;
|
||||
for (size_t index = paramsCount; index < rawCount; index++)
|
||||
for (std::size_t index = paramsCount; index < rawCount; index++)
|
||||
{
|
||||
uint32 value = ((uint32*)&e.target.raw)[index];
|
||||
if (value != 0)
|
||||
|
||||
@@ -40,10 +40,10 @@ AC_API_EXPORT EnumText EnumUtils<CreatureAI::EvadeReason>::ToString(CreatureAI::
|
||||
}
|
||||
|
||||
template <>
|
||||
AC_API_EXPORT size_t EnumUtils<CreatureAI::EvadeReason>::Count() { return 4; }
|
||||
AC_API_EXPORT std::size_t EnumUtils<CreatureAI::EvadeReason>::Count() { return 4; }
|
||||
|
||||
template <>
|
||||
AC_API_EXPORT CreatureAI::EvadeReason EnumUtils<CreatureAI::EvadeReason>::FromIndex(size_t index)
|
||||
AC_API_EXPORT CreatureAI::EvadeReason EnumUtils<CreatureAI::EvadeReason>::FromIndex(std::size_t index)
|
||||
{
|
||||
switch (index)
|
||||
{
|
||||
@@ -56,7 +56,7 @@ AC_API_EXPORT CreatureAI::EvadeReason EnumUtils<CreatureAI::EvadeReason>::FromIn
|
||||
}
|
||||
|
||||
template <>
|
||||
AC_API_EXPORT size_t EnumUtils<CreatureAI::EvadeReason>::ToIndex(CreatureAI::EvadeReason value)
|
||||
AC_API_EXPORT std::size_t EnumUtils<CreatureAI::EvadeReason>::ToIndex(CreatureAI::EvadeReason value)
|
||||
{
|
||||
switch (value)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user