From ce4bbcfc44410bba2a2dfbbd6b5251dd3dc2137c Mon Sep 17 00:00:00 2001 From: Tom Sepez Date: Thu, 18 Oct 2018 16:28:09 +0000 Subject: Repack CPDFSDK_FieldAction. Save a few bytes. Initialize members in header. Change-Id: Ie203771f0eee7fb8807a0e652013237679c47481 Reviewed-on: https://pdfium-review.googlesource.com/c/44230 Reviewed-by: Lei Zhang Commit-Queue: Tom Sepez --- fpdfsdk/cpdfsdk_fieldaction.cpp | 12 +++--------- fpdfsdk/cpdfsdk_fieldaction.h | 17 +++++++++-------- 2 files changed, 12 insertions(+), 17 deletions(-) diff --git a/fpdfsdk/cpdfsdk_fieldaction.cpp b/fpdfsdk/cpdfsdk_fieldaction.cpp index 352da391df..57fa1b608b 100644 --- a/fpdfsdk/cpdfsdk_fieldaction.cpp +++ b/fpdfsdk/cpdfsdk_fieldaction.cpp @@ -6,12 +6,6 @@ #include "fpdfsdk/cpdfsdk_fieldaction.h" -CPDFSDK_FieldAction::CPDFSDK_FieldAction() - : bModifier(false), - bShift(false), - bKeyDown(false), - nSelEnd(0), - nSelStart(0), - bWillCommit(false), - bFieldFull(false), - bRC(true) {} +CPDFSDK_FieldAction::CPDFSDK_FieldAction() = default; + +CPDFSDK_FieldAction::~CPDFSDK_FieldAction() = default; diff --git a/fpdfsdk/cpdfsdk_fieldaction.h b/fpdfsdk/cpdfsdk_fieldaction.h index 36a57e55d2..7c24121216 100644 --- a/fpdfsdk/cpdfsdk_fieldaction.h +++ b/fpdfsdk/cpdfsdk_fieldaction.h @@ -21,18 +21,19 @@ typedef enum { struct CPDFSDK_FieldAction { CPDFSDK_FieldAction(); CPDFSDK_FieldAction(const CPDFSDK_FieldAction& other) = delete; + ~CPDFSDK_FieldAction(); - bool bModifier; - bool bShift; + bool bModifier = false; + bool bShift = false; + bool bKeyDown = false; + bool bWillCommit = false; + bool bFieldFull = false; + bool bRC = true; + int nSelEnd = 0; + int nSelStart = 0; WideString sChange; WideString sChangeEx; - bool bKeyDown; - int nSelEnd; - int nSelStart; WideString sValue; - bool bWillCommit; - bool bFieldFull; - bool bRC; }; #endif // FPDFSDK_CPDFSDK_FIELDACTION_H_ -- cgit v1.2.3