summaryrefslogtreecommitdiff
path: root/core/fxcodec/gif/cfx_gif.cpp
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2018-04-27 22:46:28 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-04-27 22:46:28 +0000
commit7c7f78a432a41b7074d225a91a590185e02aacf7 (patch)
tree391e7f4922444d11eb3ec48834ae7e677eda839e /core/fxcodec/gif/cfx_gif.cpp
parent743cfe00e32fc70540f06e41a613087929a5d4ac (diff)
downloadpdfium-chromium/3414.tar.xz
Use C++ style struct syntax (file already has other C++ features). Assert that things have packed as intended since they map to known layouts. Order these asserts in the same order as .h file. Change-Id: I0a006c4b5789fb544783f488d5b4e609e32c7ec1 Reviewed-on: https://pdfium-review.googlesource.com/31654 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'core/fxcodec/gif/cfx_gif.cpp')
-rw-r--r--core/fxcodec/gif/cfx_gif.cpp20
1 files changed, 14 insertions, 6 deletions
diff --git a/core/fxcodec/gif/cfx_gif.cpp b/core/fxcodec/gif/cfx_gif.cpp
index e87b9df975..18d474ba9a 100644
--- a/core/fxcodec/gif/cfx_gif.cpp
+++ b/core/fxcodec/gif/cfx_gif.cpp
@@ -9,15 +9,23 @@
const char kGifSignature87[] = "GIF87a";
const char kGifSignature89[] = "GIF89a";
+static_assert(sizeof(CFX_GifGlobalFlags) == 1,
+ "CFX_GifGlobalFlags should have a size of 1");
+static_assert(sizeof(CFX_GifLocalFlags) == 1,
+ "CFX_GifLocalFlags should have a size of 1");
+static_assert(sizeof(CFX_GifHeader) == 6,
+ "CFX_GifHeader should have a size of 6");
+static_assert(sizeof(CFX_GifLocalScreenDescriptor) == 7,
+ "CFX_GifLocalScreenDescriptor should have a size of 7");
static_assert(sizeof(CFX_CFX_GifImageInfo) == 9,
"CFX_CFX_GifImageInfo should have a size of 9");
-static_assert(sizeof(CFX_GifPalette) == 3,
- "CFX_GifPalette should have a size of 3");
+static_assert(sizeof(CFX_GifControlExtensionFlags) == 1,
+ "CFX_GifControlExtensionFlags should have a size of 1");
static_assert(sizeof(CFX_GifPlainTextExtension) == 13,
"CFX_GifPlainTextExtension should have a size of 13");
static_assert(sizeof(CFX_GifGraphicControlExtension) == 5,
"CFX_GifGraphicControlExtension should have a size of 5");
-static_assert(sizeof(CFX_GifHeader) == 6,
- "CFX_GifHeader should have a size of 6");
-static_assert(sizeof(CFX_GifLocalScreenDescriptor) == 7,
- "CFX_GifLocalScreenDescriptor should have a size of 7");
+static_assert(sizeof(GifApplicationExtension) == 12,
+ "GifApplicationExtension should have a size of 12");
+static_assert(sizeof(CFX_GifPalette) == 3,
+ "CFX_GifPalette should have a size of 3");