summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2018-10-18 16:28:09 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-10-18 16:28:09 +0000
commitce4bbcfc44410bba2a2dfbbd6b5251dd3dc2137c (patch)
tree253da154f3bbcb5bd4f19a370c4ea9bf9ccbd069
parentec885bad72ef8bae21270d235ae5029ef2bdc134 (diff)
downloadpdfium-ce4bbcfc44410bba2a2dfbbd6b5251dd3dc2137c.tar.xz
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 <thestig@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
-rw-r--r--fpdfsdk/cpdfsdk_fieldaction.cpp12
-rw-r--r--fpdfsdk/cpdfsdk_fieldaction.h17
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_