summaryrefslogtreecommitdiff
path: root/core/fpdfapi
diff options
context:
space:
mode:
Diffstat (limited to 'core/fpdfapi')
-rw-r--r--core/fpdfapi/font/fpdf_font.cpp2
-rw-r--r--core/fpdfapi/font/ttgsubtable.cpp4
-rw-r--r--core/fpdfapi/page/cpdf_streamcontentparser.cpp2
-rw-r--r--core/fpdfapi/page/fpdf_page_func.cpp6
-rw-r--r--core/fpdfapi/parser/cpdf_array_unittest.cpp12
-rw-r--r--core/fpdfapi/render/cpdf_renderstatus.cpp2
6 files changed, 14 insertions, 14 deletions
diff --git a/core/fpdfapi/font/fpdf_font.cpp b/core/fpdfapi/font/fpdf_font.cpp
index 7bbd637177..86beccaeb4 100644
--- a/core/fpdfapi/font/fpdf_font.cpp
+++ b/core/fpdfapi/font/fpdf_font.cpp
@@ -36,7 +36,7 @@ int TT2PDF(int m, FXFT_Face face) {
}
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 51e8e9cc20..946ccd7abe 100644
--- a/core/fpdfapi/font/ttgsubtable.cpp
+++ b/core/fpdfapi/font/ttgsubtable.cpp
@@ -144,7 +144,7 @@ bool CFX_CTTGSUBTable::GetVerticalGlyphSub2(uint32_t glyphnum,
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 @@ bool CFX_CTTGSUBTable::GetVerticalGlyphSub2(uint32_t glyphnum,
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 6211b6a4dd..102ec7973a 100644
--- a/core/fpdfapi/page/cpdf_streamcontentparser.cpp
+++ b/core/fpdfapi/page/cpdf_streamcontentparser.cpp
@@ -163,7 +163,7 @@ struct AbbrReplacementOp {
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 916641f05d..f81ec9e6bd 100644
--- a/core/fpdfapi/page/fpdf_page_func.cpp
+++ b/core/fpdfapi/page/fpdf_page_func.cpp
@@ -469,9 +469,9 @@ bool CPDF_PSEngine::DoOperator(PDF_PSOP op) {
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 46777289b5..6d458d83cd 100644
--- a/core/fpdfapi/parser/cpdf_array_unittest.cpp
+++ b/core/fpdfapi/parser/cpdf_array_unittest.cpp
@@ -133,9 +133,9 @@ TEST(cpdf_array, Clone) {
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 @@ TEST(cpdf_array, Clone) {
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, Clone) {
}
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 9022212ecc..682e6c0c91 100644
--- a/core/fpdfapi/render/cpdf_renderstatus.cpp
+++ b/core/fpdfapi/render/cpdf_renderstatus.cpp
@@ -1993,7 +1993,7 @@ void CPDF_RenderStatus::DrawTextPathWithPattern(const CPDF_TextObject* textobj,
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();