diff options
author | Lei Zhang <thestig@chromium.org> | 2017-03-10 14:37:14 -0800 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-03-13 19:28:30 +0000 |
commit | 375c2764b56b38cc9326a8f8ef668fbf78234e9a (patch) | |
tree | ee1056ac37b855135c8c5a544d4716c3d1a9c7b1 /fpdfsdk | |
parent | 723987910fb195e454aab28e1088df4f9ccf0d6e (diff) | |
download | pdfium-375c2764b56b38cc9326a8f8ef668fbf78234e9a.tar.xz |
Make most PDFium code pass Clang plugin's auto raw check.
Change-Id: I9dc32342e24361389841ecba83081a97fc043377
Reviewed-on: https://pdfium-review.googlesource.com/2959
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Diffstat (limited to 'fpdfsdk')
-rw-r--r-- | fpdfsdk/cba_annotiterator.cpp | 2 | ||||
-rw-r--r-- | fpdfsdk/cpdfsdk_annotiteration.cpp | 2 | ||||
-rw-r--r-- | fpdfsdk/cpdfsdk_interform.cpp | 2 | ||||
-rw-r--r-- | fpdfsdk/fpdfeditpath.cpp | 16 | ||||
-rw-r--r-- | fpdfsdk/fpdfedittext.cpp | 2 | ||||
-rw-r--r-- | fpdfsdk/fpdfxfa/cxfa_fwladaptertimermgr.cpp | 2 | ||||
-rw-r--r-- | fpdfsdk/javascript/Field.cpp | 2 | ||||
-rw-r--r-- | fpdfsdk/pdfwindow/PWL_Wnd.cpp | 18 |
8 files changed, 23 insertions, 23 deletions
diff --git a/fpdfsdk/cba_annotiterator.cpp b/fpdfsdk/cba_annotiterator.cpp index cc842babee..409a9282d1 100644 --- a/fpdfsdk/cba_annotiterator.cpp +++ b/fpdfsdk/cba_annotiterator.cpp @@ -73,7 +73,7 @@ CPDFSDK_Annot* CBA_AnnotIterator::GetPrevAnnot(CPDFSDK_Annot* pAnnot) { } void CBA_AnnotIterator::CollectAnnots(std::vector<CPDFSDK_Annot*>* pArray) { - for (auto pAnnot : m_pPageView->GetAnnotList()) { + for (auto* pAnnot : m_pPageView->GetAnnotList()) { if (pAnnot->GetAnnotSubtype() == m_nAnnotSubtype && !pAnnot->IsSignatureWidget()) { pArray->push_back(pAnnot); diff --git a/fpdfsdk/cpdfsdk_annotiteration.cpp b/fpdfsdk/cpdfsdk_annotiteration.cpp index dd99ade509..d256950658 100644 --- a/fpdfsdk/cpdfsdk_annotiteration.cpp +++ b/fpdfsdk/cpdfsdk_annotiteration.cpp @@ -33,7 +33,7 @@ CPDFSDK_AnnotIteration::CPDFSDK_AnnotIteration(CPDFSDK_PageView* pPageView, std::reverse(copiedList.begin(), copiedList.end()); m_List.reserve(copiedList.size()); - for (const auto& pAnnot : copiedList) + for (auto* pAnnot : copiedList) m_List.emplace_back(pAnnot); } diff --git a/fpdfsdk/cpdfsdk_interform.cpp b/fpdfsdk/cpdfsdk_interform.cpp index 4ebcf8a2f3..1dbffa4a5a 100644 --- a/fpdfsdk/cpdfsdk_interform.cpp +++ b/fpdfsdk/cpdfsdk_interform.cpp @@ -321,7 +321,7 @@ void CPDFSDK_InterForm::ResetFieldAppearance(CPDF_FormField* pFormField, } void CPDFSDK_InterForm::UpdateField(CPDF_FormField* pFormField) { - auto formfiller = m_pFormFillEnv->GetInteractiveFormFiller(); + auto* formfiller = m_pFormFillEnv->GetInteractiveFormFiller(); for (int i = 0, sz = pFormField->CountControls(); i < sz; i++) { CPDF_FormControl* pFormCtrl = pFormField->GetControl(i); ASSERT(pFormCtrl); diff --git a/fpdfsdk/fpdfeditpath.cpp b/fpdfsdk/fpdfeditpath.cpp index 074f083bb1..d7ffd8b1f2 100644 --- a/fpdfsdk/fpdfeditpath.cpp +++ b/fpdfsdk/fpdfeditpath.cpp @@ -33,7 +33,7 @@ DLLEXPORT FPDF_BOOL FPDFPath_SetStrokeColor(FPDF_PAGEOBJECT path, if (!path || R > 255 || G > 255 || B > 255 || A > 255) return false; - auto pPathObj = reinterpret_cast<CPDF_PathObject*>(path); + auto* pPathObj = reinterpret_cast<CPDF_PathObject*>(path); pPathObj->m_GeneralState.SetStrokeAlpha(A / 255.f); FX_FLOAT rgb[3] = {R / 255.f, G / 255.f, B / 255.f}; pPathObj->m_ColorState.SetStrokeColor( @@ -45,7 +45,7 @@ DLLEXPORT FPDF_BOOL FPDFPath_SetStrokeWidth(FPDF_PAGEOBJECT path, float width) { if (!path || width < 0.0f) return false; - auto pPathObj = reinterpret_cast<CPDF_PathObject*>(path); + auto* pPathObj = reinterpret_cast<CPDF_PathObject*>(path); pPathObj->m_GraphState.SetLineWidth(width); return true; } @@ -58,7 +58,7 @@ DLLEXPORT FPDF_BOOL FPDFPath_SetFillColor(FPDF_PAGEOBJECT path, if (!path || R > 255 || G > 255 || B > 255 || A > 255) return false; - auto pPathObj = reinterpret_cast<CPDF_PathObject*>(path); + auto* pPathObj = reinterpret_cast<CPDF_PathObject*>(path); pPathObj->m_GeneralState.SetFillAlpha(A / 255.f); FX_FLOAT rgb[3] = {R / 255.f, G / 255.f, B / 255.f}; pPathObj->m_ColorState.SetFillColor( @@ -70,7 +70,7 @@ DLLEXPORT FPDF_BOOL FPDFPath_MoveTo(FPDF_PAGEOBJECT path, float x, float y) { if (!path) return false; - auto pPathObj = reinterpret_cast<CPDF_PathObject*>(path); + auto* pPathObj = reinterpret_cast<CPDF_PathObject*>(path); pPathObj->m_Path.AppendPoint(CFX_PointF(x, y), FXPT_TYPE::MoveTo, false); return true; } @@ -79,7 +79,7 @@ DLLEXPORT FPDF_BOOL FPDFPath_LineTo(FPDF_PAGEOBJECT path, float x, float y) { if (!path) return false; - auto pPathObj = reinterpret_cast<CPDF_PathObject*>(path); + auto* pPathObj = reinterpret_cast<CPDF_PathObject*>(path); pPathObj->m_Path.AppendPoint(CFX_PointF(x, y), FXPT_TYPE::LineTo, false); return true; } @@ -94,7 +94,7 @@ DLLEXPORT FPDF_BOOL FPDFPath_BezierTo(FPDF_PAGEOBJECT path, if (!path) return false; - auto pPathObj = reinterpret_cast<CPDF_PathObject*>(path); + auto* pPathObj = reinterpret_cast<CPDF_PathObject*>(path); pPathObj->m_Path.AppendPoint(CFX_PointF(x1, y1), FXPT_TYPE::BezierTo, false); pPathObj->m_Path.AppendPoint(CFX_PointF(x2, y2), FXPT_TYPE::BezierTo, false); pPathObj->m_Path.AppendPoint(CFX_PointF(x3, y3), FXPT_TYPE::BezierTo, false); @@ -105,7 +105,7 @@ DLLEXPORT FPDF_BOOL FPDFPath_Close(FPDF_PAGEOBJECT path) { if (!path) return false; - auto pPathObj = reinterpret_cast<CPDF_PathObject*>(path); + auto* pPathObj = reinterpret_cast<CPDF_PathObject*>(path); if (pPathObj->m_Path.GetPoints().empty()) return false; @@ -119,7 +119,7 @@ DLLEXPORT FPDF_BOOL FPDFPath_SetDrawMode(FPDF_PAGEOBJECT path, if (!path) return false; - auto pPathObj = reinterpret_cast<CPDF_PathObject*>(path); + auto* pPathObj = reinterpret_cast<CPDF_PathObject*>(path); if (fillmode == FPDF_FILLMODE_ALTERNATE) pPathObj->m_FillType = FXFILL_ALTERNATE; diff --git a/fpdfsdk/fpdfedittext.cpp b/fpdfsdk/fpdfedittext.cpp index 5ce4be65a1..aec6050d21 100644 --- a/fpdfsdk/fpdfedittext.cpp +++ b/fpdfsdk/fpdfedittext.cpp @@ -240,7 +240,7 @@ DLLEXPORT FPDF_BOOL STDCALL FPDFText_SetText(FPDF_PAGEOBJECT text_object, if (!text_object) return false; - auto pTextObj = reinterpret_cast<CPDF_TextObject*>(text_object); + auto* pTextObj = reinterpret_cast<CPDF_TextObject*>(text_object); pTextObj->SetText(CFX_ByteString(text)); return true; } diff --git a/fpdfsdk/fpdfxfa/cxfa_fwladaptertimermgr.cpp b/fpdfsdk/fpdfxfa/cxfa_fwladaptertimermgr.cpp index 39aa72be87..c03ee45ac4 100644 --- a/fpdfsdk/fpdfxfa/cxfa_fwladaptertimermgr.cpp +++ b/fpdfsdk/fpdfxfa/cxfa_fwladaptertimermgr.cpp @@ -66,7 +66,7 @@ void CXFA_FWLAdapterTimerMgr::TimerProc(int32_t idEvent) { if (!s_TimerArray) return; - for (const auto info : *s_TimerArray) { + for (auto* info : *s_TimerArray) { CFWL_FWLAdapterTimerInfo* pInfo = static_cast<CFWL_FWLAdapterTimerInfo*>(info); if (pInfo->idEvent == idEvent) { diff --git a/fpdfsdk/javascript/Field.cpp b/fpdfsdk/javascript/Field.cpp index f37b3d486b..61a2538df7 100644 --- a/fpdfsdk/javascript/Field.cpp +++ b/fpdfsdk/javascript/Field.cpp @@ -1816,7 +1816,7 @@ bool Field::page(CJS_Runtime* pRuntime, return false; } - auto pWidget = static_cast<CPDFSDK_Widget*>(pObserved.Get()); + auto* pWidget = static_cast<CPDFSDK_Widget*>(pObserved.Get()); CPDFSDK_PageView* pPageView = pWidget->GetPageView(); if (!pPageView) return false; diff --git a/fpdfsdk/pdfwindow/PWL_Wnd.cpp b/fpdfsdk/pdfwindow/PWL_Wnd.cpp index 14024dd5d4..dc307a1be3 100644 --- a/fpdfsdk/pdfwindow/PWL_Wnd.cpp +++ b/fpdfsdk/pdfwindow/PWL_Wnd.cpp @@ -15,7 +15,7 @@ static std::map<int32_t, CPWL_Timer*>& GetPWLTimeMap() { // Leak the object at shutdown. - static auto timeMap = new std::map<int32_t, CPWL_Timer*>; + static auto* timeMap = new std::map<int32_t, CPWL_Timer*>; return *timeMap; } @@ -412,7 +412,7 @@ void CPWL_Wnd::InvalidateRect(CFX_FloatRect* pRect) { return false; \ if (!IsWndCaptureKeyboard(this)) \ return false; \ - for (const auto& pChild : m_Children) { \ + for (auto* pChild : m_Children) { \ if (pChild && IsWndCaptureKeyboard(pChild)) \ return pChild->key_method_name(nChar, nFlag); \ } \ @@ -428,7 +428,7 @@ PWL_IMPLEMENT_KEY_METHOD(OnChar) if (!IsValid() || !IsVisible() || !IsEnabled()) \ return false; \ if (IsWndCaptureMouse(this)) { \ - for (const auto& pChild : m_Children) { \ + for (auto* pChild : m_Children) { \ if (pChild && IsWndCaptureMouse(pChild)) { \ return pChild->mouse_method_name(pChild->ParentToChild(point), \ nFlag); \ @@ -437,7 +437,7 @@ PWL_IMPLEMENT_KEY_METHOD(OnChar) SetCursor(); \ return false; \ } \ - for (const auto& pChild : m_Children) { \ + for (auto* pChild : m_Children) { \ if (pChild && pChild->WndHitTest(pChild->ParentToChild(point))) { \ return pChild->mouse_method_name(pChild->ParentToChild(point), nFlag); \ } \ @@ -465,7 +465,7 @@ bool CPWL_Wnd::OnMouseWheel(short zDelta, if (!IsWndCaptureKeyboard(this)) return false; - for (const auto& pChild : m_Children) { + for (auto* pChild : m_Children) { if (pChild && IsWndCaptureKeyboard(pChild)) return pChild->OnMouseWheel(zDelta, pChild->ParentToChild(point), nFlag); } @@ -628,7 +628,7 @@ void CPWL_Wnd::SetCapture() { } void CPWL_Wnd::ReleaseCapture() { - for (const auto& pChild : m_Children) { + for (auto* pChild : m_Children) { if (pChild) pChild->ReleaseCapture(); } @@ -674,7 +674,7 @@ void CPWL_Wnd::SetVisible(bool bVisible) { if (!IsValid()) return; - for (const auto& pChild : m_Children) { + for (auto* pChild : m_Children) { if (pChild) pChild->SetVisible(bVisible); } @@ -818,7 +818,7 @@ int32_t CPWL_Wnd::GetTransparency() { } void CPWL_Wnd::SetTransparency(int32_t nTransparency) { - for (const auto& pChild : m_Children) { + for (auto* pChild : m_Children) { if (pChild) pChild->SetTransparency(nTransparency); } @@ -892,7 +892,7 @@ void CPWL_Wnd::EnableWindow(bool bEnable) { if (m_bEnabled == bEnable) return; - for (const auto& pChild : m_Children) { + for (auto* pChild : m_Children) { if (pChild) pChild->EnableWindow(bEnable); } |