summaryrefslogtreecommitdiff
path: root/core/include/fxcrt
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2015-11-11 16:59:19 -0800
committerLei Zhang <thestig@chromium.org>2015-11-11 16:59:19 -0800
commit982e8905f4af77348af14fae0116fecc71f856c8 (patch)
tree5c933e87f3029de753d13be058990ae4fb8030e8 /core/include/fxcrt
parent46bed62931ffc9e482525de4525a6e54043c6899 (diff)
downloadpdfium-982e8905f4af77348af14fae0116fecc71f856c8.tar.xz
Merge to XFA: Fix / simplify CFX_FolderFontInfo::GetFontData() behavior.
The GetFontData() behavior in FPDF_SYSFONTINFO seems reasonable. Also do some code cleanup. TBR=tsepez@chromium.org Review URL: https://codereview.chromium.org/1425023003 . (cherry picked from commit e0c16d7461ca8317433d93835e4c36a84157cbef) Review URL: https://codereview.chromium.org/1438943002 .
Diffstat (limited to 'core/include/fxcrt')
-rw-r--r--core/include/fxcrt/fx_system.h10
1 files changed, 4 insertions, 6 deletions
diff --git a/core/include/fxcrt/fx_system.h b/core/include/fxcrt/fx_system.h
index 5fe3453626..e0412a0349 100644
--- a/core/include/fxcrt/fx_system.h
+++ b/core/include/fxcrt/fx_system.h
@@ -258,12 +258,10 @@ wchar_t* FXSYS_wcsupr(wchar_t* str);
#define FXDWORD_FROM_MSBFIRST(i) \
(((uint8_t)(i) << 24) | ((uint8_t)((i) >> 8) << 16) | \
((uint8_t)((i) >> 16) << 8) | (uint8_t)((i) >> 24))
-#define FXDWORD_GET_LSBFIRST(p) \
- ((((uint8_t*)(p))[3] << 24) | (((uint8_t*)(p))[2] << 16) | \
- (((uint8_t*)(p))[1] << 8) | (((uint8_t*)(p))[0]))
-#define FXDWORD_GET_MSBFIRST(p) \
- ((((uint8_t*)(p))[0] << 24) | (((uint8_t*)(p))[1] << 16) | \
- (((uint8_t*)(p))[2] << 8) | (((uint8_t*)(p))[3]))
+#define FXDWORD_GET_LSBFIRST(p) \
+ ((p[3] << 24) | (p[2] << 16) | (p[1] << 8) | (p[0]))
+#define FXDWORD_GET_MSBFIRST(p) \
+ ((p[0] << 24) | (p[1] << 16) | (p[2] << 8) | (p[3]))
#define FXSYS_HIBYTE(word) ((uint8_t)((word) >> 8))
#define FXSYS_LOBYTE(word) ((uint8_t)(word))
#define FXSYS_HIWORD(dword) ((FX_WORD)((dword) >> 16))