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>
diff --git a/fpdfsdk/cba_annotiterator.cpp b/fpdfsdk/cba_annotiterator.cpp
index cc842ba..409a928 100644
--- a/fpdfsdk/cba_annotiterator.cpp
+++ b/fpdfsdk/cba_annotiterator.cpp
@@ -73,7 +73,7 @@
 }
 
 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 dd99ade..d256950 100644
--- a/fpdfsdk/cpdfsdk_annotiteration.cpp
+++ b/fpdfsdk/cpdfsdk_annotiteration.cpp
@@ -33,7 +33,7 @@
     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 4ebcf8a..1dbffa4 100644
--- a/fpdfsdk/cpdfsdk_interform.cpp
+++ b/fpdfsdk/cpdfsdk_interform.cpp
@@ -321,7 +321,7 @@
 }
 
 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 074f083..d7ffd8b 100644
--- a/fpdfsdk/fpdfeditpath.cpp
+++ b/fpdfsdk/fpdfeditpath.cpp
@@ -33,7 +33,7 @@
   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 @@
   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 @@
   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 @@
   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 @@
   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 @@
   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 @@
   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 @@
   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 5ce4be6..aec6050 100644
--- a/fpdfsdk/fpdfedittext.cpp
+++ b/fpdfsdk/fpdfedittext.cpp
@@ -240,7 +240,7 @@
   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 39aa72b..c03ee45 100644
--- a/fpdfsdk/fpdfxfa/cxfa_fwladaptertimermgr.cpp
+++ b/fpdfsdk/fpdfxfa/cxfa_fwladaptertimermgr.cpp
@@ -66,7 +66,7 @@
   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 f37b3d4..61a2538 100644
--- a/fpdfsdk/javascript/Field.cpp
+++ b/fpdfsdk/javascript/Field.cpp
@@ -1816,7 +1816,7 @@
       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 14024dd..dc307a1 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 @@
       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 @@
     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 @@
       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 @@
   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::ReleaseCapture() {
-  for (const auto& pChild : m_Children) {
+  for (auto* pChild : m_Children) {
     if (pChild)
       pChild->ReleaseCapture();
   }
@@ -674,7 +674,7 @@
   if (!IsValid())
     return;
 
-  for (const auto& pChild : m_Children) {
+  for (auto* pChild : m_Children) {
     if (pChild)
       pChild->SetVisible(bVisible);
   }
@@ -818,7 +818,7 @@
 }
 
 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 @@
   if (m_bEnabled == bEnable)
     return;
 
-  for (const auto& pChild : m_Children) {
+  for (auto* pChild : m_Children) {
     if (pChild)
       pChild->EnableWindow(bEnable);
   }