From 375c2764b56b38cc9326a8f8ef668fbf78234e9a Mon Sep 17 00:00:00 2001 From: Lei Zhang Date: Fri, 10 Mar 2017 14:37:14 -0800 Subject: 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 Commit-Queue: Lei Zhang --- fpdfsdk/pdfwindow/PWL_Wnd.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'fpdfsdk/pdfwindow/PWL_Wnd.cpp') 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& GetPWLTimeMap() { // Leak the object at shutdown. - static auto timeMap = new std::map; + static auto* timeMap = new std::map; 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); } -- cgit v1.2.3