feat(Core/Misc): replace ACE based typedefs (#2460)
This commit is contained in:
+8
-10
@@ -7,12 +7,10 @@
|
|||||||
#ifndef TRINITY_DEFINE_H
|
#ifndef TRINITY_DEFINE_H
|
||||||
#define TRINITY_DEFINE_H
|
#define TRINITY_DEFINE_H
|
||||||
|
|
||||||
#include <cstdint>
|
|
||||||
#include <cstddef>
|
#include <cstddef>
|
||||||
#include <sys/types.h>
|
#include <cinttypes>
|
||||||
#include <ace/Basic_Types.h>
|
#include <climits>
|
||||||
#include <ace/ACE_export.h>
|
#include <cstring>
|
||||||
#include <ace/Default_Constants.h>
|
|
||||||
#include "CompilerDefs.h"
|
#include "CompilerDefs.h"
|
||||||
|
|
||||||
#if defined(_WIN32) || defined(WIN32) || defined(__CYGWIN__) || defined(__MINGW32__) || defined(__BORLANDC__)
|
#if defined(_WIN32) || defined(WIN32) || defined(__CYGWIN__) || defined(__MINGW32__) || defined(__BORLANDC__)
|
||||||
@@ -63,13 +61,13 @@
|
|||||||
# define ATTR_DEPRECATED
|
# define ATTR_DEPRECATED
|
||||||
#endif //AC_COMPILER == AC_COMPILER_GNU
|
#endif //AC_COMPILER == AC_COMPILER_GNU
|
||||||
|
|
||||||
#define UI64FMTD ACE_UINT64_FORMAT_SPECIFIER
|
#define UI64FMTD "%" PRIu64
|
||||||
#define UI64LIT(N) ACE_UINT64_LITERAL(N)
|
#define UI64LIT(N) UINT64_C(N)
|
||||||
|
|
||||||
#define SI64FMTD ACE_INT64_FORMAT_SPECIFIER
|
#define SI64FMTD "%" PRId64
|
||||||
#define SI64LIT(N) ACE_INT64_LITERAL(N)
|
#define SI64LIT(N) INT64_C(N)
|
||||||
|
|
||||||
#define SIZEFMTD ACE_SIZE_T_FORMAT_SPECIFIER
|
#define SZFMTD "%" PRIuPTR
|
||||||
|
|
||||||
#define UNUSED(x) (void)(x)
|
#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()))
|
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());
|
internal_event_id, mGameEventCreatureGuids.size());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -1297,7 +1297,7 @@ void GameEventMgr::GameEventSpawn(int16 event_id)
|
|||||||
|
|
||||||
if (internal_event_id < 0 || internal_event_id >= int32(mGameEventGameobjectGuids.size()))
|
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());
|
internal_event_id, mGameEventGameobjectGuids.size());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -1330,7 +1330,7 @@ void GameEventMgr::GameEventSpawn(int16 event_id)
|
|||||||
|
|
||||||
if (internal_event_id < 0 || internal_event_id >= int32(mGameEventPoolIds.size()))
|
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());
|
internal_event_id, mGameEventPoolIds.size());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -1345,7 +1345,7 @@ void GameEventMgr::GameEventUnspawn(int16 event_id)
|
|||||||
|
|
||||||
if (internal_event_id < 0 || internal_event_id >= int32(mGameEventCreatureGuids.size()))
|
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());
|
internal_event_id, mGameEventCreatureGuids.size());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -1367,7 +1367,7 @@ void GameEventMgr::GameEventUnspawn(int16 event_id)
|
|||||||
|
|
||||||
if (internal_event_id < 0 || internal_event_id >= int32(mGameEventGameobjectGuids.size()))
|
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());
|
internal_event_id, mGameEventGameobjectGuids.size());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -1388,7 +1388,7 @@ void GameEventMgr::GameEventUnspawn(int16 event_id)
|
|||||||
}
|
}
|
||||||
if (internal_event_id < 0 || internal_event_id >= int32(mGameEventPoolIds.size()))
|
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;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -8720,7 +8720,7 @@ void ObjectMgr::LoadBroadcastTexts()
|
|||||||
}
|
}
|
||||||
while (result->NextRow());
|
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();
|
sLog->outString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -731,14 +731,14 @@ public:
|
|||||||
|
|
||||||
if (item->GetOwnerGUID() != player->GetGUID())
|
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;
|
error = true;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (item->GetQueuePos() != i)
|
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;
|
error = true;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@@ -750,14 +750,14 @@ public:
|
|||||||
|
|
||||||
if (test == nullptr)
|
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;
|
error = true;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (test != item)
|
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;
|
error = true;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -101,7 +101,7 @@ public:
|
|||||||
Movement::PointsArray const& pointPath = path.GetPath();
|
Movement::PointsArray const& pointPath = path.GetPath();
|
||||||
handler->PSendSysMessage("%s's path to %s:", target->GetName().c_str(), player->GetName().c_str());
|
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("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 &start = path.GetStartPosition();
|
||||||
G3D::Vector3 const &end = path.GetEndPosition();
|
G3D::Vector3 const &end = path.GetEndPosition();
|
||||||
@@ -275,7 +275,7 @@ public:
|
|||||||
|
|
||||||
if (!creatureList.empty())
|
if (!creatureList.empty())
|
||||||
{
|
{
|
||||||
handler->PSendSysMessage("Found %zu Creatures.", creatureList.size());
|
handler->PSendSysMessage("Found " SZFMTD " Creatures.", creatureList.size());
|
||||||
|
|
||||||
uint32 paths = 0;
|
uint32 paths = 0;
|
||||||
uint32 uStartTime = getMSTime();
|
uint32 uStartTime = getMSTime();
|
||||||
|
|||||||
Reference in New Issue
Block a user