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/core/fpdfapi/font/fpdf_font.cpp b/core/fpdfapi/font/fpdf_font.cpp
index 7bbd637..86becca 100644
--- a/core/fpdfapi/font/fpdf_font.cpp
+++ b/core/fpdfapi/font/fpdf_font.cpp
@@ -36,7 +36,7 @@
 }
 
 bool FT_UseTTCharmap(FXFT_Face face, int platform_id, int encoding_id) {
-  auto* pCharMap = FXFT_Get_Face_Charmaps(face);
+  auto** pCharMap = FXFT_Get_Face_Charmaps(face);
   for (int i = 0; i < FXFT_Get_Face_CharmapCount(face); i++) {
     if (FXFT_Get_Charmap_PlatformID(pCharMap[i]) == platform_id &&
         FXFT_Get_Charmap_EncodingID(pCharMap[i]) == encoding_id) {
diff --git a/core/fpdfapi/font/ttgsubtable.cpp b/core/fpdfapi/font/ttgsubtable.cpp
index 51e8e9c..946ccd7 100644
--- a/core/fpdfapi/font/ttgsubtable.cpp
+++ b/core/fpdfapi/font/ttgsubtable.cpp
@@ -144,7 +144,7 @@
   for (const auto& subTable : Lookup->SubTables) {
     switch (subTable->SubstFormat) {
       case 1: {
-        auto tbl1 = static_cast<TSingleSubstFormat1*>(subTable.get());
+        auto* tbl1 = static_cast<TSingleSubstFormat1*>(subTable.get());
         if (GetCoverageIndex(tbl1->Coverage.get(), glyphnum) >= 0) {
           *vglyphnum = glyphnum + tbl1->DeltaGlyphID;
           return true;
@@ -152,7 +152,7 @@
         break;
       }
       case 2: {
-        auto tbl2 = static_cast<TSingleSubstFormat2*>(subTable.get());
+        auto* tbl2 = static_cast<TSingleSubstFormat2*>(subTable.get());
         int index = GetCoverageIndex(tbl2->Coverage.get(), glyphnum);
         if (index >= 0 &&
             index < pdfium::CollectionSize<int>(tbl2->Substitutes)) {
diff --git a/core/fpdfapi/page/cpdf_streamcontentparser.cpp b/core/fpdfapi/page/cpdf_streamcontentparser.cpp
index 6211b6a..102ec79 100644
--- a/core/fpdfapi/page/cpdf_streamcontentparser.cpp
+++ b/core/fpdfapi/page/cpdf_streamcontentparser.cpp
@@ -163,7 +163,7 @@
 CFX_ByteStringC FindFullName(const AbbrPair* table,
                              size_t count,
                              const CFX_ByteStringC& abbr) {
-  auto it = std::find_if(table, table + count, [abbr](const AbbrPair& pair) {
+  auto* it = std::find_if(table, table + count, [abbr](const AbbrPair& pair) {
     return pair.abbr == abbr;
   });
   return it != table + count ? CFX_ByteStringC(it->full_name)
diff --git a/core/fpdfapi/page/fpdf_page_func.cpp b/core/fpdfapi/page/fpdf_page_func.cpp
index 916641f..f81ec9e 100644
--- a/core/fpdfapi/page/fpdf_page_func.cpp
+++ b/core/fpdfapi/page/fpdf_page_func.cpp
@@ -469,9 +469,9 @@
       j %= n;
       if (j > 0)
         j -= n;
-      auto begin_it = std::begin(m_Stack) + m_StackCount - n;
-      auto middle_it = begin_it - j;
-      auto end_it = std::begin(m_Stack) + m_StackCount;
+      auto* begin_it = std::begin(m_Stack) + m_StackCount - n;
+      auto* middle_it = begin_it - j;
+      auto* end_it = std::begin(m_Stack) + m_StackCount;
       std::rotate(begin_it, middle_it, end_it);
       break;
     }
diff --git a/core/fpdfapi/parser/cpdf_array_unittest.cpp b/core/fpdfapi/parser/cpdf_array_unittest.cpp
index 4677728..6d458d8 100644
--- a/core/fpdfapi/parser/cpdf_array_unittest.cpp
+++ b/core/fpdfapi/parser/cpdf_array_unittest.cpp
@@ -133,9 +133,9 @@
       EXPECT_NE(arr_elem, arr1_elem);
       EXPECT_NE(arr_elem, arr2_elem);
       for (size_t j = 0; j < kNumOfRowElems; ++j) {
-        auto elem_obj = arr_elem->GetObjectAt(j);
-        auto elem_obj1 = arr1_elem->GetObjectAt(j);
-        auto elem_obj2 = arr2_elem->GetObjectAt(j);
+        auto* elem_obj = arr_elem->GetObjectAt(j);
+        auto* elem_obj1 = arr1_elem->GetObjectAt(j);
+        auto* elem_obj2 = arr2_elem->GetObjectAt(j);
         // Results from not deferencing reference objects.
         EXPECT_NE(elem_obj, elem_obj1);
         EXPECT_TRUE(elem_obj1->IsReference());
@@ -154,7 +154,7 @@
     for (size_t i = 0; i < kNumOfRows; ++i) {
       for (size_t j = 0; j < kNumOfRowElems; ++j) {
         // Results from not deferencing reference objects.
-        auto elem_obj1 = arr1->GetObjectAt(i)->AsArray()->GetObjectAt(j);
+        auto* elem_obj1 = arr1->GetObjectAt(i)->AsArray()->GetObjectAt(j);
         EXPECT_TRUE(elem_obj1->IsReference());
         EXPECT_EQ(elems[i][j], elem_obj1->GetInteger());
         // Results from deferencing reference objects.
@@ -166,8 +166,8 @@
 }
 
 TEST(cpdf_array, Iterator) {
-  int elems[] = {-23, -11,     3,         455,   2345877,
-                 0,   7895330, -12564334, 10000, -100000};
+  const int elems[] = {-23, -11,     3,         455,   2345877,
+                       0,   7895330, -12564334, 10000, -100000};
   std::unique_ptr<CPDF_Array> arr(new CPDF_Array);
   for (size_t i = 0; i < FX_ArraySize(elems); ++i)
     arr->InsertNewAt<CPDF_Number>(i, elems[i]);
diff --git a/core/fpdfapi/render/cpdf_renderstatus.cpp b/core/fpdfapi/render/cpdf_renderstatus.cpp
index 9022212..682e6c0 100644
--- a/core/fpdfapi/render/cpdf_renderstatus.cpp
+++ b/core/fpdfapi/render/cpdf_renderstatus.cpp
@@ -1993,7 +1993,7 @@
   CharPosList.Load(textobj->m_CharCodes, textobj->m_CharPos, pFont, font_size);
   for (uint32_t i = 0; i < CharPosList.m_nChars; i++) {
     FXTEXT_CHARPOS& charpos = CharPosList.m_pCharPos[i];
-    auto font =
+    auto* font =
         charpos.m_FallbackFontPosition == -1
             ? &pFont->m_Font
             : pFont->m_FontFallbacks[charpos.m_FallbackFontPosition].get();
diff --git a/core/fpdfdoc/cpdf_formfield.cpp b/core/fpdfdoc/cpdf_formfield.cpp
index b4aa90e..f9187d8 100644
--- a/core/fpdfdoc/cpdf_formfield.cpp
+++ b/core/fpdfdoc/cpdf_formfield.cpp
@@ -407,7 +407,7 @@
   if (CPDF_Object* pObj = FPDF_GetFieldAttr(m_pDict, "MaxLen"))
     return pObj->GetInteger();
 
-  for (const auto& pControl : m_ControlList) {
+  for (auto* pControl : m_ControlList) {
     if (!pControl)
       continue;
     CPDF_Dictionary* pWidgetDict = pControl->m_pWidgetDict;
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..61a2538d 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);
   }
diff --git a/xfa/fde/cfde_txtedttextset.cpp b/xfa/fde/cfde_txtedttextset.cpp
index 1f86dab..a6503f4 100644
--- a/xfa/fde/cfde_txtedttextset.cpp
+++ b/xfa/fde/cfde_txtedttextset.cpp
@@ -78,7 +78,7 @@
   if (!pPiece || pPiece->nCount < 1)
     return std::vector<CFX_RectF>();
 
-  auto pEngine = static_cast<CFDE_TxtEdtEngine*>(m_pPage->GetEngine());
+  auto* pEngine = static_cast<CFDE_TxtEdtEngine*>(m_pPage->GetEngine());
   const FDE_TXTEDTPARAMS* pTextParams = pEngine->GetEditParams();
   uint32_t dwLayoutStyle = pEngine->GetTextBreak()->GetLayoutStyles();
   FX_TXTRUN tr;
diff --git a/xfa/fde/css/cfde_cssstyleselector.cpp b/xfa/fde/css/cfde_cssstyleselector.cpp
index 5a7aa1b..08cd0e9 100644
--- a/xfa/fde/css/cfde_cssstyleselector.cpp
+++ b/xfa/fde/css/cfde_cssstyleselector.cpp
@@ -56,7 +56,7 @@
   if (m_UARules.CountSelectors() == 0 || tagname.IsEmpty())
     return matchedDecls;
 
-  auto rules = m_UARules.GetTagRuleData(tagname);
+  auto* rules = m_UARules.GetTagRuleData(tagname);
   if (!rules)
     return matchedDecls;
 
@@ -106,19 +106,19 @@
   std::vector<const CFDE_CSSPropertyHolder*> normals;
   std::vector<const CFDE_CSSCustomProperty*> customs;
 
-  for (auto& decl : declArray)
+  for (auto* decl : declArray)
     ExtractValues(decl, &importants, &normals, &customs);
 
   if (extraDecl)
     ExtractValues(extraDecl, &importants, &normals, &customs);
 
-  for (auto& prop : normals)
+  for (auto* prop : normals)
     ApplyProperty(prop->eProperty, prop->pValue, pComputedStyle);
 
-  for (auto& prop : customs)
+  for (auto* prop : customs)
     pComputedStyle->AddCustomStyle(*prop);
 
-  for (auto& prop : importants)
+  for (auto* prop : importants)
     ApplyProperty(prop->eProperty, prop->pValue, pComputedStyle);
 }
 
diff --git a/xfa/fde/css/cfde_cssstylesheet.cpp b/xfa/fde/css/cfde_cssstylesheet.cpp
index c8bf70e..e259e2f 100644
--- a/xfa/fde/css/cfde_cssstylesheet.cpp
+++ b/xfa/fde/css/cfde_cssstylesheet.cpp
@@ -85,7 +85,7 @@
       case FDE_CSSSyntaxStatus::PropertyValue: {
         if (propertyTable || iValueLen > 0) {
           CFX_WideStringC strValue = pSyntax->GetCurrentString();
-          auto decl = pStyleRule->GetDeclaration();
+          auto* decl = pStyleRule->GetDeclaration();
           if (!strValue.IsEmpty()) {
             if (propertyTable) {
               decl->AddProperty(propertyTable, strValue);
diff --git a/xfa/fde/css/cfde_cssstylesheet_unittest.cpp b/xfa/fde/css/cfde_cssstylesheet_unittest.cpp
index fa73a7a..9d8ecb9 100644
--- a/xfa/fde/css/cfde_cssstylesheet_unittest.cpp
+++ b/xfa/fde/css/cfde_cssstylesheet_unittest.cpp
@@ -143,7 +143,7 @@
   CFDE_CSSStyleRule* style = sheet_->GetRule(0);
   EXPECT_EQ(1UL, style->CountSelectorLists());
 
-  auto sel = style->GetSelectorList(0);
+  auto* sel = style->GetSelectorList(0);
   EXPECT_TRUE(sel != nullptr);
   EXPECT_EQ(FX_HashCode_GetW(L"c", true), sel->GetNameHash());
 
diff --git a/xfa/fwl/cfwl_checkbox.cpp b/xfa/fwl/cfwl_checkbox.cpp
index 0102bc7..ca31094 100644
--- a/xfa/fwl/cfwl_checkbox.cpp
+++ b/xfa/fwl/cfwl_checkbox.cpp
@@ -184,7 +184,7 @@
       if (!pWidgetMgr->IsFormDisabled()) {
         std::vector<CFWL_Widget*> radioarr =
             pWidgetMgr->GetSameGroupRadioButton(this);
-        for (const auto& pWidget : radioarr) {
+        for (auto* pWidget : radioarr) {
           CFWL_CheckBox* pCheckBox = static_cast<CFWL_CheckBox*>(pWidget);
           if (pCheckBox != this &&
               pCheckBox->GetStates() & FWL_STATE_CKB_Checked) {
diff --git a/xfa/fxbarcode/qrcode/BC_QRCoderEncoder.cpp b/xfa/fxbarcode/qrcode/BC_QRCoderEncoder.cpp
index 2c262f0..3a442be 100644
--- a/xfa/fxbarcode/qrcode/BC_QRCoderEncoder.cpp
+++ b/xfa/fxbarcode/qrcode/BC_QRCoderEncoder.cpp
@@ -259,8 +259,8 @@
     int32_t& e) {
   size_t mergeNum = 0;
   for (size_t i = 0; i + 1 < result->size(); i++) {
-    auto element1 = &(*result)[i];
-    auto element2 = &(*result)[i + 1];
+    auto* element1 = &(*result)[i];
+    auto* element2 = &(*result)[i + 1];
     if (element1->first == CBC_QRCoderMode::sALPHANUMERIC) {
       int32_t tmp = GetSpanByVersion(CBC_QRCoderMode::sALPHANUMERIC,
                                      CBC_QRCoderMode::sBYTE, versionNum, e);
diff --git a/xfa/fxfa/app/xfa_ffchoicelist.cpp b/xfa/fxfa/app/xfa_ffchoicelist.cpp
index 3aabde8..66b52fe 100644
--- a/xfa/fxfa/app/xfa_ffchoicelist.cpp
+++ b/xfa/fxfa/app/xfa_ffchoicelist.cpp
@@ -227,7 +227,7 @@
 }
 
 bool CXFA_FFComboBox::PtInActiveRect(const CFX_PointF& point) {
-  auto pComboBox = static_cast<CFWL_ComboBox*>(m_pNormalWidget);
+  auto* pComboBox = static_cast<CFWL_ComboBox*>(m_pNormalWidget);
   return pComboBox && pComboBox->GetBBox().Contains(point);
 }
 
diff --git a/xfa/fxfa/app/xfa_ffdocview.cpp b/xfa/fxfa/app/xfa_ffdocview.cpp
index 8744181..545afca 100644
--- a/xfa/fxfa/app/xfa_ffdocview.cpp
+++ b/xfa/fxfa/app/xfa_ffdocview.cpp
@@ -633,12 +633,12 @@
 }
 
 void CXFA_FFDocView::AddCalculateNodeNotify(CXFA_Node* pNodeChange) {
-  auto pGlobalData =
+  auto* pGlobalData =
       static_cast<CXFA_CalcData*>(pNodeChange->GetUserData(XFA_CalcData));
   if (!pGlobalData)
     return;
 
-  for (const auto& pResultAcc : pGlobalData->m_Globals) {
+  for (auto* pResultAcc : pGlobalData->m_Globals) {
     if (!pResultAcc->GetNode()->HasRemovedChildren())
       AddCalculateWidgetAcc(pResultAcc);
   }
@@ -723,7 +723,7 @@
   return true;
 }
 void CXFA_FFDocView::RunBindItems() {
-  for (const auto& item : m_BindItems) {
+  for (auto* item : m_BindItems) {
     if (item->HasRemovedChildren())
       continue;
 
diff --git a/xfa/fxfa/app/xfa_ffpageview.cpp b/xfa/fxfa/app/xfa_ffpageview.cpp
index caff52c..181f0f1 100644
--- a/xfa/fxfa/app/xfa_ffpageview.cpp
+++ b/xfa/fxfa/app/xfa_ffpageview.cpp
@@ -363,8 +363,8 @@
 
 static int32_t XFA_TabOrderWidgetComparator(const void* phWidget1,
                                             const void* phWidget2) {
-  auto param1 = *static_cast<CXFA_TabParam**>(const_cast<void*>(phWidget1));
-  auto param2 = *static_cast<CXFA_TabParam**>(const_cast<void*>(phWidget2));
+  auto* param1 = *static_cast<CXFA_TabParam**>(const_cast<void*>(phWidget1));
+  auto* param2 = *static_cast<CXFA_TabParam**>(const_cast<void*>(phWidget2));
   CFX_RectF rt1 = param1->m_pWidget->GetWidgetRect();
   CFX_RectF rt2 = param2->m_pWidget->GetWidgetRect();
   FX_FLOAT x1 = rt1.left, y1 = rt1.top, x2 = rt2.left, y2 = rt2.top;
diff --git a/xfa/fxfa/app/xfa_ffwidgetacc.cpp b/xfa/fxfa/app/xfa_ffwidgetacc.cpp
index adc5c31..960771f 100644
--- a/xfa/fxfa/app/xfa_ffwidgetacc.cpp
+++ b/xfa/fxfa/app/xfa_ffwidgetacc.cpp
@@ -1505,7 +1505,7 @@
     font.GetTypeface(wsFontName);
   }
 
-  auto pDoc = GetDoc();
+  auto* pDoc = GetDoc();
   return pDoc->GetApp()->GetXFAFontMgr()->GetFont(pDoc, wsFontName,
                                                   dwFontStyle);
 }
diff --git a/xfa/fxfa/parser/cxfa_layoutitem.cpp b/xfa/fxfa/parser/cxfa_layoutitem.cpp
index 476d611..5409c4e 100644
--- a/xfa/fxfa/parser/cxfa_layoutitem.cpp
+++ b/xfa/fxfa/parser/cxfa_layoutitem.cpp
@@ -64,7 +64,7 @@
 CFX_RectF CXFA_LayoutItem::GetRect(bool bRelative) const {
   ASSERT(m_bIsContentLayoutItem);
 
-  auto pThis = static_cast<const CXFA_ContentLayoutItem*>(this);
+  auto* pThis = static_cast<const CXFA_ContentLayoutItem*>(this);
   CFX_PointF sPos = pThis->m_sPos;
   CFX_SizeF sSize = pThis->m_sSize;
   if (bRelative)
diff --git a/xfa/fxfa/parser/xfa_layout_itemlayout.cpp b/xfa/fxfa/parser/xfa_layout_itemlayout.cpp
index dd38c96..dd04668 100644
--- a/xfa/fxfa/parser/xfa_layout_itemlayout.cpp
+++ b/xfa/fxfa/parser/xfa_layout_itemlayout.cpp
@@ -182,7 +182,7 @@
   int32_t nCurrentColIdx = 0;
   bool bMetWholeRowCell = false;
 
-  for (auto pLayoutChild =
+  for (auto* pLayoutChild =
            static_cast<CXFA_ContentLayoutItem*>(pLayoutRow->m_pFirstChild);
        pLayoutChild; pLayoutChild = static_cast<CXFA_ContentLayoutItem*>(
                          pLayoutChild->m_pNextSibling)) {
@@ -1995,7 +1995,7 @@
                                          childSize.height, &keepLayoutItems)) {
     m_arrayKeepItems.clear();
 
-    for (auto item : keepLayoutItems) {
+    for (auto* item : keepLayoutItems) {
       pParentProcessor->m_pLayoutItem->RemoveChild(item);
       *fContentCurRowY -= item->m_sSize.height;
       m_arrayKeepItems.push_back(item);
@@ -2271,7 +2271,7 @@
         case XFA_ItemLayoutProcessorStages::None:
           break;
         case XFA_ItemLayoutProcessorStages::BreakBefore: {
-          for (auto item : m_arrayKeepItems) {
+          for (auto* item : m_arrayKeepItems) {
             m_pLayoutItem->RemoveChild(item);
             fContentCalculatedHeight -= item->m_sSize.height;
           }
diff --git a/xfa/fxfa/parser/xfa_utils.cpp b/xfa/fxfa/parser/xfa_utils.cpp
index 6f54c0e..216c5a5 100644
--- a/xfa/fxfa/parser/xfa_utils.cpp
+++ b/xfa/fxfa/parser/xfa_utils.cpp
@@ -328,10 +328,10 @@
   if (!pProperties || iCount < 1)
     return nullptr;
 
-  auto it = std::find_if(pProperties, pProperties + iCount,
-                         [eProperty](const XFA_PROPERTY& prop) {
-                           return prop.eName == eProperty;
-                         });
+  auto* it = std::find_if(pProperties, pProperties + iCount,
+                          [eProperty](const XFA_PROPERTY& prop) {
+                            return prop.eName == eProperty;
+                          });
   if (it == pProperties + iCount)
     return nullptr;
 
@@ -375,10 +375,11 @@
 
   uint32_t uHash = FX_HashCode_GetW(wsName, false);
   const XFA_ELEMENTINFO* pEnd = g_XFAElementData + g_iXFAElementCount;
-  auto pInfo = std::lower_bound(g_XFAElementData, pEnd, uHash,
-                                [](const XFA_ELEMENTINFO& info, uint32_t hash) {
-                                  return info.uHash < hash;
-                                });
+  auto* pInfo =
+      std::lower_bound(g_XFAElementData, pEnd, uHash,
+                       [](const XFA_ELEMENTINFO& info, uint32_t hash) {
+                         return info.uHash < hash;
+                       });
   if (pInfo < pEnd && pInfo->uHash == uHash)
     return pInfo->eName;
   return XFA_Element::Unknown;