summaryrefslogtreecommitdiff
path: root/core/fxge/dib
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2018-04-10 22:01:56 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-04-10 22:01:56 +0000
commit486f39568b6f336b4e6c81300ee9caae54ebdff2 (patch)
treead87a740cab424d781178c438aea07af8df762c0 /core/fxge/dib
parentcd7b4ab7519c31a27c8d31e0cb694257fea84fd1 (diff)
downloadpdfium-486f39568b6f336b4e6c81300ee9caae54ebdff2.tar.xz
Add static_asserts for FX_RECT and FX_COLORREF.
Make sure they match their win32 equivalent data types. Change-Id: I395054ce5c5ae110c78dbae30dd985fc498045fb Reviewed-on: https://pdfium-review.googlesource.com/30070 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
Diffstat (limited to 'core/fxge/dib')
-rw-r--r--core/fxge/dib/fx_dib_main.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/core/fxge/dib/fx_dib_main.cpp b/core/fxge/dib/fx_dib_main.cpp
index 546198b7a9..e2e2213e8f 100644
--- a/core/fxge/dib/fx_dib_main.cpp
+++ b/core/fxge/dib/fx_dib_main.cpp
@@ -12,6 +12,11 @@
#include "core/fxcrt/fx_extension.h"
#include "third_party/base/ptr_util.h"
+#if _FX_PLATFORM_ == _FX_PLATFORM_WINDOWS_
+static_assert(sizeof(FX_COLORREF) == sizeof(COLORREF),
+ "FX_COLORREF vs. COLORREF mismatch");
+#endif
+
const int16_t SDP_Table[513] = {
256, 256, 256, 256, 256, 256, 256, 256, 256, 255, 255, 255, 255, 255, 255,
254, 254, 254, 254, 253, 253, 253, 252, 252, 252, 251, 251, 251, 250, 250,