Pack struct PacketRecord more tightly on 64-bits.
One of the advantages of defining these tables via macros is that
these sorts of re-arrangments are not very disruptive.
Change-Id: Id0e3a90cd9229eaa2dd0fc04c062a9e66a05b135
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/52511
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
diff --git a/xfa/fxfa/parser/xfa_basic_data.cpp b/xfa/fxfa/parser/xfa_basic_data.cpp
index 9ba5e42..e7b01c9 100644
--- a/xfa/fxfa/parser/xfa_basic_data.cpp
+++ b/xfa/fxfa/parser/xfa_basic_data.cpp
@@ -44,18 +44,18 @@
namespace {
struct PacketRecord {
- uint32_t hash;
- const wchar_t* name;
XFA_PacketType packet_type;
- const wchar_t* uri;
+ uint32_t hash;
uint32_t flags;
+ const wchar_t* name;
+ const wchar_t* uri;
};
const PacketRecord g_PacketTable[] = {
#undef PCKT____
-#define PCKT____(a, b, c, d, e, f) \
- {a, L##b, XFA_PacketType::c, d, \
- XFA_XDPPACKET_FLAGS_##e | XFA_XDPPACKET_FLAGS_##f},
+#define PCKT____(a, b, c, d, e, f) \
+ {XFA_PacketType::c, a, XFA_XDPPACKET_FLAGS_##e | XFA_XDPPACKET_FLAGS_##f, \
+ L##b, d},
#include "xfa/fxfa/parser/packets.inc"
#undef PCKT____
};