summaryrefslogtreecommitdiff
path: root/core/fpdfdoc/cpdf_variabletext.cpp
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2018-08-21 23:10:51 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-08-21 23:10:51 +0000
commitae386367e8c0475fd5bcbacb9baa557409afb9c6 (patch)
tree0363fab846c6bbcbfb0c3f66d1988b4906f07b3e /core/fpdfdoc/cpdf_variabletext.cpp
parentbcdbeaea96d53800ee806f463108f54f79a19347 (diff)
downloadpdfium-ae386367e8c0475fd5bcbacb9baa557409afb9c6.tar.xz
Use UnownedPtr in CPDF_VariableText
Re-arrange order of some variables so that the lifetime constraints are not violated, even temporarilly. Change-Id: I859f1217d5af0f4c703a3d8ed742c1f144cc1c61 Reviewed-on: https://pdfium-review.googlesource.com/40950 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'core/fpdfdoc/cpdf_variabletext.cpp')
-rw-r--r--core/fpdfdoc/cpdf_variabletext.cpp19
1 files changed, 3 insertions, 16 deletions
diff --git a/core/fpdfdoc/cpdf_variabletext.cpp b/core/fpdfdoc/cpdf_variabletext.cpp
index 31f09c9dcd..ddc3bb4459 100644
--- a/core/fpdfdoc/cpdf_variabletext.cpp
+++ b/core/fpdfdoc/cpdf_variabletext.cpp
@@ -178,22 +178,9 @@ bool CPDF_VariableText::Iterator::GetLine(CPVT_Line& line) const {
return true;
}
-CPDF_VariableText::CPDF_VariableText()
- : m_nLimitChar(0),
- m_nCharArray(0),
- m_bMultiLine(false),
- m_bLimitWidth(false),
- m_bAutoFontSize(false),
- m_nAlignment(0),
- m_fLineLeading(0.0f),
- m_fCharSpace(0.0f),
- m_nHorzScale(100),
- m_wSubWord(0),
- m_fFontSize(0.0f),
- m_bInitialized(false),
- m_pVTProvider(nullptr) {}
-
-CPDF_VariableText::~CPDF_VariableText() {}
+CPDF_VariableText::CPDF_VariableText() = default;
+
+CPDF_VariableText::~CPDF_VariableText() = default;
void CPDF_VariableText::Initialize() {
if (m_bInitialized)