From 614fbce1f56c31abfe94b6fcd4f450371c3c50f5 Mon Sep 17 00:00:00 2001 From: "apatrick@google.com" Date: Fri, 6 Nov 2009 19:17:18 +0000 Subject: Removed core\cross\packing.h. Using approach consistent with Chrome. #pragma pack works in both MSVC and GCC. http://gcc.gnu.org/onlinedocs/gcc/Structure_002dPacking-Pragmas.html Review URL: http://codereview.chromium.org/373005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31262 0039d316-1c4b-4281-b951-d872f2087c98 --- o3d/command_buffer/common/cross/cmd_buffer_common.h | 5 ++--- o3d/command_buffer/common/cross/o3d_cmd_format.h | 4 ++-- 2 files changed, 4 insertions(+), 5 deletions(-) (limited to 'o3d/command_buffer') diff --git a/o3d/command_buffer/common/cross/cmd_buffer_common.h b/o3d/command_buffer/common/cross/cmd_buffer_common.h index 2ce3e3f..8934c94 100644 --- a/o3d/command_buffer/common/cross/cmd_buffer_common.h +++ b/o3d/command_buffer/common/cross/cmd_buffer_common.h @@ -39,7 +39,6 @@ #include "command_buffer/common/cross/types.h" #include "command_buffer/common/cross/bitfield_helpers.h" #include "command_buffer/common/cross/logging.h" -#include "core/cross/packing.h" namespace command_buffer { @@ -105,7 +104,7 @@ COMPILE_ASSERT(sizeof(CommandBufferEntry) == 4, // Make sure the compiler does not add extra padding to any of the command // structures. -O3D_PUSH_STRUCTURE_PACKING_1; +#pragma pack(push, 1) // Gets the address of memory just after a structure in a typesafe way. This is // used for IMMEDIATE commands to get the address of the place to put the data. @@ -240,7 +239,7 @@ COMPILE_ASSERT(offsetof(SetToken, token) == 4, } // namespace cmd -O3D_POP_STRUCTURE_PACKING; +#pragma pack(pop) } // namespace command_buffer diff --git a/o3d/command_buffer/common/cross/o3d_cmd_format.h b/o3d/command_buffer/common/cross/o3d_cmd_format.h index a75deed..9830774 100644 --- a/o3d/command_buffer/common/cross/o3d_cmd_format.h +++ b/o3d/command_buffer/common/cross/o3d_cmd_format.h @@ -242,7 +242,7 @@ const char* GetCommandName(CommandId id); // Make sure the compiler does not add extra padding to any of the command // structures. -O3D_PUSH_STRUCTURE_PACKING_1; +#pragma pack(push, 1) struct BeginFrame { typedef BeginFrame ValueType; @@ -3147,7 +3147,7 @@ COMPILE_ASSERT(sizeof(SetBackSurfaces) == 4, COMPILE_ASSERT(offsetof(SetBackSurfaces, header) == 0, OffsetOf_SetBackSurfaces_header_not_0); -O3D_POP_STRUCTURE_PACKING; +#pragma pack(pop) } // namespace o3d } // namespace command_buffer -- cgit v1.1