From 797ca5cad52edde7c65da45a15216f20b1bfd8fd Mon Sep 17 00:00:00 2001 From: Tom Sepez Date: Thu, 25 May 2017 12:03:18 -0700 Subject: Mass conversion of all const-lifetime class members Sed + minimal conversions to compile, including moving some constructors into the .cpp file. Any that caused ASAN issues during the tests were omitted rather than trying to resolve the underlying issue. Change-Id: I00a421f33b253eb4071ffd9af3f2922c7443b335 Reviewed-on: https://pdfium-review.googlesource.com/5891 Commit-Queue: Tom Sepez Reviewed-by: Lei Zhang --- core/fpdfdoc/cpdf_annot.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'core/fpdfdoc/cpdf_annot.cpp') diff --git a/core/fpdfdoc/cpdf_annot.cpp b/core/fpdfdoc/cpdf_annot.cpp index 146c863cf3..eab6cd0145 100644 --- a/core/fpdfdoc/cpdf_annot.cpp +++ b/core/fpdfdoc/cpdf_annot.cpp @@ -90,23 +90,23 @@ void CPDF_Annot::GenerateAPIfNeeded() { CPDF_Dictionary* pDict = m_pAnnotDict.Get(); bool result = false; if (m_nSubtype == CPDF_Annot::Subtype::CIRCLE) - result = CPVT_GenerateAP::GenerateCircleAP(m_pDocument, pDict); + result = CPVT_GenerateAP::GenerateCircleAP(m_pDocument.Get(), pDict); else if (m_nSubtype == CPDF_Annot::Subtype::HIGHLIGHT) - result = CPVT_GenerateAP::GenerateHighlightAP(m_pDocument, pDict); + result = CPVT_GenerateAP::GenerateHighlightAP(m_pDocument.Get(), pDict); else if (m_nSubtype == CPDF_Annot::Subtype::INK) - result = CPVT_GenerateAP::GenerateInkAP(m_pDocument, pDict); + result = CPVT_GenerateAP::GenerateInkAP(m_pDocument.Get(), pDict); else if (m_nSubtype == CPDF_Annot::Subtype::POPUP) - result = CPVT_GenerateAP::GeneratePopupAP(m_pDocument, pDict); + result = CPVT_GenerateAP::GeneratePopupAP(m_pDocument.Get(), pDict); else if (m_nSubtype == CPDF_Annot::Subtype::SQUARE) - result = CPVT_GenerateAP::GenerateSquareAP(m_pDocument, pDict); + result = CPVT_GenerateAP::GenerateSquareAP(m_pDocument.Get(), pDict); else if (m_nSubtype == CPDF_Annot::Subtype::SQUIGGLY) - result = CPVT_GenerateAP::GenerateSquigglyAP(m_pDocument, pDict); + result = CPVT_GenerateAP::GenerateSquigglyAP(m_pDocument.Get(), pDict); else if (m_nSubtype == CPDF_Annot::Subtype::STRIKEOUT) - result = CPVT_GenerateAP::GenerateStrikeOutAP(m_pDocument, pDict); + result = CPVT_GenerateAP::GenerateStrikeOutAP(m_pDocument.Get(), pDict); else if (m_nSubtype == CPDF_Annot::Subtype::TEXT) - result = CPVT_GenerateAP::GenerateTextAP(m_pDocument, pDict); + result = CPVT_GenerateAP::GenerateTextAP(m_pDocument.Get(), pDict); else if (m_nSubtype == CPDF_Annot::Subtype::UNDERLINE) - result = CPVT_GenerateAP::GenerateUnderlineAP(m_pDocument, pDict); + result = CPVT_GenerateAP::GenerateUnderlineAP(m_pDocument.Get(), pDict); if (result) { m_pAnnotDict->SetNewFor(kPDFiumKey_HasGeneratedAP, result); @@ -205,7 +205,7 @@ CPDF_Form* CPDF_Annot::GetAPForm(const CPDF_Page* pPage, AppearanceMode mode) { return it->second.get(); auto pNewForm = pdfium::MakeUnique( - m_pDocument, pPage->m_pResources.Get(), pStream); + m_pDocument.Get(), pPage->m_pResources.Get(), pStream); pNewForm->ParseContent(nullptr, nullptr, nullptr); CPDF_Form* pResult = pNewForm.get(); -- cgit v1.2.3