mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-29 13:22:48 +01:00
Core/Misc: Removed gcc specific packing pragma syntax - only unsupported (now) versions required it
(cherry picked from commit 4c7c2abf03)
Conflicts:
src/server/bnetserver/Packets/BitStream.h
src/server/shared/Common.h
This commit is contained in:
@@ -30,13 +30,7 @@
|
||||
#include <vector>
|
||||
|
||||
// Structures using to access raw DBC data and required packing to portability
|
||||
|
||||
// GCC have alternative #pragma pack(N) syntax and old gcc version not support pack(push, N), also any gcc version not support it at some platform
|
||||
#if defined(__GNUC__)
|
||||
#pragma pack(1)
|
||||
#else
|
||||
#pragma pack(push, 1)
|
||||
#endif
|
||||
|
||||
struct AchievementEntry
|
||||
{
|
||||
@@ -2177,12 +2171,7 @@ struct WorldStateUI
|
||||
};
|
||||
*/
|
||||
|
||||
// GCC have alternative #pragma pack() syntax and old gcc version not support pack(pop), also any gcc version not support it at some platform
|
||||
#if defined(__GNUC__)
|
||||
#pragma pack()
|
||||
#else
|
||||
#pragma pack(pop)
|
||||
#endif
|
||||
|
||||
// Structures not used for casting to loaded DBC data and not required then packing
|
||||
struct MapDifficulty
|
||||
|
||||
@@ -170,12 +170,7 @@ struct CreatureTemplate
|
||||
// Benchmarked: Faster than std::map (insert/find)
|
||||
typedef std::unordered_map<uint32, CreatureTemplate> CreatureTemplateContainer;
|
||||
|
||||
// GCC have alternative #pragma pack(N) syntax and old gcc version not support pack(push, N), also any gcc version not support it at some platform
|
||||
#if defined(__GNUC__)
|
||||
#pragma pack(1)
|
||||
#else
|
||||
#pragma pack(push, 1)
|
||||
#endif
|
||||
|
||||
// Defines base stats for creatures (used to calculate HP/mana/armor/attackpower/rangedattackpower/all damage).
|
||||
struct CreatureBaseStats
|
||||
@@ -307,12 +302,7 @@ enum ChatType
|
||||
CHAT_TYPE_END = 255
|
||||
};
|
||||
|
||||
// GCC have alternative #pragma pack() syntax and old gcc version not support pack(pop), also any gcc version not support it at some platform
|
||||
#if defined(__GNUC__)
|
||||
#pragma pack()
|
||||
#else
|
||||
#pragma pack(pop)
|
||||
#endif
|
||||
|
||||
// `creature_addon` table
|
||||
struct CreatureAddon
|
||||
|
||||
@@ -49,12 +49,7 @@ struct PlayerClassLevelInfo;
|
||||
struct PlayerInfo;
|
||||
struct PlayerLevelInfo;
|
||||
|
||||
// GCC have alternative #pragma pack(N) syntax and old gcc version not support pack(push, N), also any gcc version not support it at some platform
|
||||
#if defined(__GNUC__)
|
||||
#pragma pack(1)
|
||||
#else
|
||||
#pragma pack(push, 1)
|
||||
#endif
|
||||
|
||||
struct PageText
|
||||
{
|
||||
@@ -82,12 +77,7 @@ private:
|
||||
uint8 _summonGroup; ///< Summon's group id
|
||||
};
|
||||
|
||||
// GCC have alternative #pragma pack() syntax and old gcc version not support pack(pop), also any gcc version not support it at some platform
|
||||
#if defined(__GNUC__)
|
||||
#pragma pack()
|
||||
#else
|
||||
#pragma pack(pop)
|
||||
#endif
|
||||
|
||||
// DB scripting commands
|
||||
enum ScriptCommands
|
||||
|
||||
@@ -210,12 +210,7 @@ public:
|
||||
ZLiquidStatus getLiquidStatus(float x, float y, float z, uint8 ReqLiquidType, LiquidData* data = 0);
|
||||
};
|
||||
|
||||
// GCC have alternative #pragma pack(N) syntax and old gcc version not support pack(push, N), also any gcc version not support it at some platform
|
||||
#if defined(__GNUC__)
|
||||
#pragma pack(1)
|
||||
#else
|
||||
#pragma pack(push, 1)
|
||||
#endif
|
||||
|
||||
struct InstanceTemplate
|
||||
{
|
||||
@@ -241,11 +236,7 @@ struct ZoneDynamicInfo
|
||||
uint32 LightFadeInTime;
|
||||
};
|
||||
|
||||
#if defined(__GNUC__)
|
||||
#pragma pack()
|
||||
#else
|
||||
#pragma pack(pop)
|
||||
#endif
|
||||
|
||||
#define MAX_HEIGHT 100000.0f // can be use for find ground height at surface
|
||||
#define INVALID_HEIGHT -100000.0f // for check, must be equal to VMAP_INVALID_HEIGHT, real value for unknown height is VMAP_INVALID_HEIGHT_VALUE
|
||||
|
||||
@@ -24,11 +24,7 @@
|
||||
|
||||
namespace Movement
|
||||
{
|
||||
#if defined( __GNUC__ )
|
||||
#pragma pack(1)
|
||||
#else
|
||||
#pragma pack(push, 1)
|
||||
#endif
|
||||
|
||||
class MoveSplineFlag
|
||||
{
|
||||
@@ -136,11 +132,7 @@ namespace Movement
|
||||
bool unknown12 : 1;
|
||||
bool unknown13 : 1;
|
||||
};
|
||||
#if defined( __GNUC__ )
|
||||
#pragma pack()
|
||||
#else
|
||||
#pragma pack(pop)
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif // TRINITYSERVER_MOVESPLINEFLAG_H
|
||||
|
||||
@@ -1363,11 +1363,7 @@ enum PacketProcessing
|
||||
class WorldSession;
|
||||
class WorldPacket;
|
||||
|
||||
#if defined(__GNUC__)
|
||||
#pragma pack(1)
|
||||
#else
|
||||
#pragma pack(push, 1)
|
||||
#endif
|
||||
|
||||
struct OpcodeHandler
|
||||
{
|
||||
@@ -1379,11 +1375,7 @@ struct OpcodeHandler
|
||||
|
||||
extern OpcodeHandler opcodeTable[NUM_MSG_TYPES];
|
||||
|
||||
#if defined(__GNUC__)
|
||||
#pragma pack()
|
||||
#else
|
||||
#pragma pack(pop)
|
||||
#endif
|
||||
|
||||
/// Lookup opcode name for human understandable logging
|
||||
inline const char* LookupOpcodeName(uint16 id)
|
||||
|
||||
@@ -57,11 +57,7 @@ enum WardenCheckType
|
||||
MODULE_CHECK = 0xD9 // 217: uint Seed + byte[20] SHA1 (check to ensure module isn't injected)
|
||||
};
|
||||
|
||||
#if defined(__GNUC__)
|
||||
#pragma pack(1)
|
||||
#else
|
||||
#pragma pack(push, 1)
|
||||
#endif
|
||||
|
||||
struct WardenModuleUse
|
||||
{
|
||||
@@ -84,11 +80,7 @@ struct WardenHashRequest
|
||||
uint8 Seed[16];
|
||||
};
|
||||
|
||||
#if defined(__GNUC__)
|
||||
#pragma pack()
|
||||
#else
|
||||
#pragma pack(pop)
|
||||
#endif
|
||||
|
||||
struct ClientWardenModule
|
||||
{
|
||||
|
||||
@@ -25,11 +25,7 @@
|
||||
#include "ByteBuffer.h"
|
||||
#include "Warden.h"
|
||||
|
||||
#if defined(__GNUC__)
|
||||
#pragma pack(1)
|
||||
#else
|
||||
#pragma pack(push, 1)
|
||||
#endif
|
||||
|
||||
struct WardenInitModuleRequest
|
||||
{
|
||||
@@ -61,11 +57,7 @@ struct WardenInitModuleRequest
|
||||
uint8 Function3_set;
|
||||
};
|
||||
|
||||
#if defined(__GNUC__)
|
||||
#pragma pack()
|
||||
#else
|
||||
#pragma pack(pop)
|
||||
#endif
|
||||
|
||||
class WorldSession;
|
||||
class Warden;
|
||||
|
||||
@@ -255,11 +255,7 @@ class Field
|
||||
Field();
|
||||
~Field();
|
||||
|
||||
#if defined(__GNUC__)
|
||||
#pragma pack(1)
|
||||
#else
|
||||
#pragma pack(push, 1)
|
||||
#endif
|
||||
struct
|
||||
{
|
||||
uint32 length; // Length (prepared strings only)
|
||||
@@ -267,11 +263,7 @@ class Field
|
||||
enum_field_types type; // Field type
|
||||
bool raw; // Raw bytes? (Prepared statement or ad hoc)
|
||||
} data;
|
||||
#if defined(__GNUC__)
|
||||
#pragma pack()
|
||||
#else
|
||||
#pragma pack(pop)
|
||||
#endif
|
||||
|
||||
void SetByteValue(void const* newValue, size_t const newSize, enum_field_types newType, uint32 length);
|
||||
void SetStructuredValue(char* newValue, enum_field_types newType);
|
||||
|
||||
Reference in New Issue
Block a user