mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-02-02 10:33:46 +00:00
feat(Core/Misc): replace ACE based typedefs (#2460)
This commit is contained in:
@@ -7,12 +7,10 @@
|
||||
#ifndef TRINITY_DEFINE_H
|
||||
#define TRINITY_DEFINE_H
|
||||
|
||||
#include <cstdint>
|
||||
#include <cstddef>
|
||||
#include <sys/types.h>
|
||||
#include <ace/Basic_Types.h>
|
||||
#include <ace/ACE_export.h>
|
||||
#include <ace/Default_Constants.h>
|
||||
#include <cinttypes>
|
||||
#include <climits>
|
||||
#include <cstring>
|
||||
#include "CompilerDefs.h"
|
||||
|
||||
#if defined(_WIN32) || defined(WIN32) || defined(__CYGWIN__) || defined(__MINGW32__) || defined(__BORLANDC__)
|
||||
@@ -63,13 +61,13 @@
|
||||
# define ATTR_DEPRECATED
|
||||
#endif //AC_COMPILER == AC_COMPILER_GNU
|
||||
|
||||
#define UI64FMTD ACE_UINT64_FORMAT_SPECIFIER
|
||||
#define UI64LIT(N) ACE_UINT64_LITERAL(N)
|
||||
#define UI64FMTD "%" PRIu64
|
||||
#define UI64LIT(N) UINT64_C(N)
|
||||
|
||||
#define SI64FMTD ACE_INT64_FORMAT_SPECIFIER
|
||||
#define SI64LIT(N) ACE_INT64_LITERAL(N)
|
||||
#define SI64FMTD "%" PRId64
|
||||
#define SI64LIT(N) INT64_C(N)
|
||||
|
||||
#define SIZEFMTD ACE_SIZE_T_FORMAT_SPECIFIER
|
||||
#define SZFMTD "%" PRIuPTR
|
||||
|
||||
#define UNUSED(x) (void)(x)
|
||||
|
||||
|
||||
@@ -1270,7 +1270,7 @@ void GameEventMgr::GameEventSpawn(int16 event_id)
|
||||
|
||||
if (internal_event_id < 0 || internal_event_id >= int32(mGameEventCreatureGuids.size()))
|
||||
{
|
||||
sLog->outError("GameEventMgr::GameEventSpawn attempt access to out of range mGameEventCreatureGuids element %i (size: " SIZEFMTD ")",
|
||||
sLog->outError("GameEventMgr::GameEventSpawn attempt access to out of range mGameEventCreatureGuids element %i (size: " SZFMTD ")",
|
||||
internal_event_id, mGameEventCreatureGuids.size());
|
||||
return;
|
||||
}
|
||||
@@ -1297,7 +1297,7 @@ void GameEventMgr::GameEventSpawn(int16 event_id)
|
||||
|
||||
if (internal_event_id < 0 || internal_event_id >= int32(mGameEventGameobjectGuids.size()))
|
||||
{
|
||||
sLog->outError("GameEventMgr::GameEventSpawn attempt access to out of range mGameEventGameobjectGuids element %i (size: " SIZEFMTD ")",
|
||||
sLog->outError("GameEventMgr::GameEventSpawn attempt access to out of range mGameEventGameobjectGuids element %i (size: " SZFMTD ")",
|
||||
internal_event_id, mGameEventGameobjectGuids.size());
|
||||
return;
|
||||
}
|
||||
@@ -1330,7 +1330,7 @@ void GameEventMgr::GameEventSpawn(int16 event_id)
|
||||
|
||||
if (internal_event_id < 0 || internal_event_id >= int32(mGameEventPoolIds.size()))
|
||||
{
|
||||
sLog->outError("GameEventMgr::GameEventSpawn attempt access to out of range mGameEventPoolIds element %u (size: " SIZEFMTD ")",
|
||||
sLog->outError("GameEventMgr::GameEventSpawn attempt access to out of range mGameEventPoolIds element %u (size: " SZFMTD ")",
|
||||
internal_event_id, mGameEventPoolIds.size());
|
||||
return;
|
||||
}
|
||||
@@ -1345,7 +1345,7 @@ void GameEventMgr::GameEventUnspawn(int16 event_id)
|
||||
|
||||
if (internal_event_id < 0 || internal_event_id >= int32(mGameEventCreatureGuids.size()))
|
||||
{
|
||||
sLog->outError("GameEventMgr::GameEventUnspawn attempt access to out of range mGameEventCreatureGuids element %i (size: " SIZEFMTD ")",
|
||||
sLog->outError("GameEventMgr::GameEventUnspawn attempt access to out of range mGameEventCreatureGuids element %i (size: " SZFMTD ")",
|
||||
internal_event_id, mGameEventCreatureGuids.size());
|
||||
return;
|
||||
}
|
||||
@@ -1367,7 +1367,7 @@ void GameEventMgr::GameEventUnspawn(int16 event_id)
|
||||
|
||||
if (internal_event_id < 0 || internal_event_id >= int32(mGameEventGameobjectGuids.size()))
|
||||
{
|
||||
sLog->outError("GameEventMgr::GameEventUnspawn attempt access to out of range mGameEventGameobjectGuids element %i (size: " SIZEFMTD ")",
|
||||
sLog->outError("GameEventMgr::GameEventUnspawn attempt access to out of range mGameEventGameobjectGuids element %i (size: " SZFMTD ")",
|
||||
internal_event_id, mGameEventGameobjectGuids.size());
|
||||
return;
|
||||
}
|
||||
@@ -1388,7 +1388,7 @@ void GameEventMgr::GameEventUnspawn(int16 event_id)
|
||||
}
|
||||
if (internal_event_id < 0 || internal_event_id >= int32(mGameEventPoolIds.size()))
|
||||
{
|
||||
sLog->outError("GameEventMgr::GameEventUnspawn attempt access to out of range mGameEventPoolIds element %u (size: " SIZEFMTD ")", internal_event_id, mGameEventPoolIds.size());
|
||||
sLog->outError("GameEventMgr::GameEventUnspawn attempt access to out of range mGameEventPoolIds element %u (size: " SZFMTD ")", internal_event_id, mGameEventPoolIds.size());
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -8720,7 +8720,7 @@ void ObjectMgr::LoadBroadcastTexts()
|
||||
}
|
||||
while (result->NextRow());
|
||||
|
||||
sLog->outString(">> Loaded " SIZEFMTD " broadcast texts in %u ms", _broadcastTextStore.size(), GetMSTimeDiffToNow(oldMSTime));
|
||||
sLog->outString(">> Loaded " SZFMTD " broadcast texts in %u ms", _broadcastTextStore.size(), GetMSTimeDiffToNow(oldMSTime));
|
||||
sLog->outString();
|
||||
}
|
||||
|
||||
|
||||
@@ -731,14 +731,14 @@ public:
|
||||
|
||||
if (item->GetOwnerGUID() != player->GetGUID())
|
||||
{
|
||||
handler->PSendSysMessage("queue(" SIZEFMTD "): For the item with guid %d, the owner's guid (%d) and the player's guid (%d) don't match!", i, item->GetGUIDLow(), GUID_LOPART(item->GetOwnerGUID()), player->GetGUIDLow());
|
||||
handler->PSendSysMessage("queue(" SZFMTD "): For the item with guid %d, the owner's guid (%d) and the player's guid (%d) don't match!", i, item->GetGUIDLow(), GUID_LOPART(item->GetOwnerGUID()), player->GetGUIDLow());
|
||||
error = true;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (item->GetQueuePos() != i)
|
||||
{
|
||||
handler->PSendSysMessage("queue(" SIZEFMTD "): For the item with guid %d, the queuepos doesn't match it's position in the queue!", i, item->GetGUIDLow());
|
||||
handler->PSendSysMessage("queue(" SZFMTD "): For the item with guid %d, the queuepos doesn't match it's position in the queue!", i, item->GetGUIDLow());
|
||||
error = true;
|
||||
continue;
|
||||
}
|
||||
@@ -750,14 +750,14 @@ public:
|
||||
|
||||
if (test == nullptr)
|
||||
{
|
||||
handler->PSendSysMessage("queue(" SIZEFMTD "): The bag(%d) and slot(%d) values for the item with guid %d are incorrect, the player doesn't have any item at that position!", i, item->GetBagSlot(), item->GetSlot(), item->GetGUIDLow());
|
||||
handler->PSendSysMessage("queue(" SZFMTD "): The bag(%d) and slot(%d) values for the item with guid %d are incorrect, the player doesn't have any item at that position!", i, item->GetBagSlot(), item->GetSlot(), item->GetGUIDLow());
|
||||
error = true;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (test != item)
|
||||
{
|
||||
handler->PSendSysMessage("queue(" SIZEFMTD "): The bag(%d) and slot(%d) values for the item with guid %d are incorrect, an item which guid is %d is there instead!", i, item->GetBagSlot(), item->GetSlot(), item->GetGUIDLow(), test->GetGUIDLow());
|
||||
handler->PSendSysMessage("queue(" SZFMTD "): The bag(%d) and slot(%d) values for the item with guid %d are incorrect, an item which guid is %d is there instead!", i, item->GetBagSlot(), item->GetSlot(), item->GetGUIDLow(), test->GetGUIDLow());
|
||||
error = true;
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -101,7 +101,7 @@ public:
|
||||
Movement::PointsArray const& pointPath = path.GetPath();
|
||||
handler->PSendSysMessage("%s's path to %s:", target->GetName().c_str(), player->GetName().c_str());
|
||||
handler->PSendSysMessage("Building: %s", useStraightPath ? "StraightPath" : useStraightLine ? "Raycast" : "SmoothPath");
|
||||
handler->PSendSysMessage("Result: %s - Length: %zu - Type: %u", (result ? "true" : "false"), pointPath.size(), path.GetPathType());
|
||||
handler->PSendSysMessage("Result: %s - Length: " SZFMTD " - Type: %u", (result ? "true" : "false"), pointPath.size(), path.GetPathType());
|
||||
|
||||
G3D::Vector3 const &start = path.GetStartPosition();
|
||||
G3D::Vector3 const &end = path.GetEndPosition();
|
||||
@@ -275,7 +275,7 @@ public:
|
||||
|
||||
if (!creatureList.empty())
|
||||
{
|
||||
handler->PSendSysMessage("Found %zu Creatures.", creatureList.size());
|
||||
handler->PSendSysMessage("Found " SZFMTD " Creatures.", creatureList.size());
|
||||
|
||||
uint32 paths = 0;
|
||||
uint32 uStartTime = getMSTime();
|
||||
|
||||
Reference in New Issue
Block a user