Save some zero bytes in struct XFA_FMHtmlReserveCode The change at https://pdfium-review.googlesource.com/c/pdfium/+/74733 gave us inline-strings to avoid relocations, so now that there is no longer a pointer in this struct, it pays to restrict the size of the character code to uint16_t as it is no longer padded to a word boundary for pointer alignment. Additionally, the longest string is 8 + NUL, so [10] should be sufficient. Change-Id: I64ed5fe15f7252cdbfc8e186d0cc0022a643e0f7 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/76530 Reviewed-by: Daniel Hosseinian <dhoss@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
diff --git a/fxjs/xfa/cfxjse_formcalc_context.cpp b/fxjs/xfa/cfxjse_formcalc_context.cpp index 99d7ca1..6f3301d 100644 --- a/fxjs/xfa/cfxjse_formcalc_context.cpp +++ b/fxjs/xfa/cfxjse_formcalc_context.cpp
@@ -45,9 +45,9 @@ const wchar_t kStrCode[] = L"0123456789abcdef"; struct XFA_FMHtmlReserveCode { - uint32_t m_uCode; + uint16_t m_uCode; // Inline string data reduces size for small strings. - const char m_htmlReserve[12]; + const char m_htmlReserve[10]; }; // Sorted by |m_htmlReserve|.