1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
|
diff --git a/core/fxge/dib/cfx_imagetransformer.cpp b/core/fxge/dib/cfx_imagetransformer.cpp
index 8e01127b0..f4ce4d915 100644
--- a/core/fxge/dib/cfx_imagetransformer.cpp
+++ b/core/fxge/dib/cfx_imagetransformer.cpp
@@ -315,14 +315,14 @@ bool CFX_ImageTransformer::Continue(IFX_PauseIndicator* pPause) {
} else if (pDestMask) {
CalcData cdata = {
pDestMask.Get(), result2stretch, pSrcMaskBuf,
- m_Storer.GetBitmap()->m_pAlphaMask->GetPitch(),
+ static_cast<uint32_t>(m_Storer.GetBitmap()->m_pAlphaMask->GetPitch()),
};
CalcMask(cdata);
}
CalcData cdata = {pTransformed.Get(), result2stretch,
m_Storer.GetBitmap()->GetBuffer(),
- m_Storer.GetBitmap()->GetPitch()};
+ static_cast<uint32_t>(m_Storer.GetBitmap()->GetPitch())};
if (m_Storer.GetBitmap()->IsAlphaMask()) {
CalcAlpha(cdata);
} else {
diff --git a/core/fpdfdoc/cpdf_metadata.cpp b/core/fpdfdoc/cpdf_metadata.cpp
index 323de4ffc..f11a0b0ad 100644
--- a/core/fpdfdoc/cpdf_metadata.cpp
+++ b/core/fpdfdoc/cpdf_metadata.cpp
@@ -74,7 +74,7 @@ std::vector<UnsupportedFeature> CPDF_Metadata::CheckForSharedForm() const {
CFX_XMLParser parser(stream);
std::unique_ptr<CFX_XMLDocument> doc = parser.Parse();
if (!doc)
- return {};
+ return std::vector<UnsupportedFeature>();
std::vector<UnsupportedFeature> unsupported;
CheckForSharedFormInternal(doc->GetRoot(), &unsupported);
diff --git a/fpdfsdk/cpdf_annotcontext.cpp b/fpdfsdk/cpdf_annotcontext.cpp
index 20c5fc343..a40cd1eae 100644
--- a/fpdfsdk/cpdf_annotcontext.cpp
+++ b/fpdfsdk/cpdf_annotcontext.cpp
@@ -16,12 +16,12 @@ CPDF_AnnotContext::CPDF_AnnotContext(CPDF_Dictionary* pAnnotDict,
CPDF_Page* pPage,
CPDF_Stream* pStream)
: m_pAnnotDict(pAnnotDict), m_pPage(pPage) {
- SetForm(pStream);
+ SetForm_(pStream);
}
CPDF_AnnotContext::~CPDF_AnnotContext() = default;
-void CPDF_AnnotContext::SetForm(CPDF_Stream* pStream) {
+void CPDF_AnnotContext::SetForm_(CPDF_Stream* pStream) {
if (!pStream)
return;
diff --git a/fpdfsdk/cpdf_annotcontext.h b/fpdfsdk/cpdf_annotcontext.h
index 38cc91e03..7904ae044 100644
--- a/fpdfsdk/cpdf_annotcontext.h
+++ b/fpdfsdk/cpdf_annotcontext.h
@@ -23,7 +23,7 @@ class CPDF_AnnotContext {
CPDF_Stream* pStream);
~CPDF_AnnotContext();
- void SetForm(CPDF_Stream* pStream);
+ void SetForm_(CPDF_Stream* pStream);
bool HasForm() const { return !!m_pAnnotForm; }
CPDF_Form* GetForm() const { return m_pAnnotForm.get(); }
CPDF_Dictionary* GetAnnotDict() const { return m_pAnnotDict.Get(); }
diff --git a/third_party/base/span.h b/third_party/base/span.h
index 0fb627ba8..f71c362e2 100644
--- a/third_party/base/span.h
+++ b/third_party/base/span.h
@@ -214,7 +214,7 @@ class span {
// Conversions from spans of compatible types: this allows a span<T> to be
// seamlessly used as a span<const T>, but not the other way around.
template <typename U, typename = internal::EnableIfLegalSpanConversion<U, T>>
- constexpr span(const span<U>& other) : span(other.data(), other.size()) {}
+ span(const span<U>& other) : span(other.data(), other.size()) {}
span& operator=(const span& other) noexcept = default;
~span() noexcept {
if (!size_) {
diff --git a/fpdfsdk/fpdf_annot.cpp b/fpdfsdk/fpdf_annot.cpp
index d3bf38d31..e8aea9707 100644
--- a/fpdfsdk/fpdf_annot.cpp
+++ b/fpdfsdk/fpdf_annot.cpp
@@ -389,7 +389,7 @@ FPDFAnnot_AppendObject(FPDF_ANNOTATION annot, FPDF_PAGEOBJECT obj) {
// Get the annotation's corresponding form object for parsing its AP stream.
if (!pAnnot->HasForm())
- pAnnot->SetForm(pStream);
+ pAnnot->SetForm_(pStream);
// Check that the object did not come from the same annotation. If this check
// succeeds, then it is assumed that the object came from
@@ -425,7 +425,7 @@ FPDF_EXPORT int FPDF_CALLCONV FPDFAnnot_GetObjectCount(FPDF_ANNOTATION annot) {
if (!pStream)
return 0;
- pAnnot->SetForm(pStream);
+ pAnnot->SetForm_(pStream);
}
return pdfium::CollectionSize<int>(*pAnnot->GetForm()->GetPageObjectList());
}
@@ -442,7 +442,7 @@ FPDFAnnot_GetObject(FPDF_ANNOTATION annot, int index) {
if (!pStream)
return nullptr;
- pAnnot->SetForm(pStream);
+ pAnnot->SetForm_(pStream);
}
return FPDFPageObjectFromCPDFPageObject(
diff --git a/third_party/base/span.h b/third_party/base/span.h
index 0fb627ba8..dda1fc8bc 100644
--- a/third_party/base/span.h
+++ b/third_party/base/span.h
@@ -204,7 +204,7 @@ class span {
// size()|.
template <typename Container,
typename = internal::EnableIfSpanCompatibleContainer<Container, T>>
- constexpr span(Container& container)
+ span(Container& container)
: span(container.data(), container.size()) {}
template <
typename Container,
diff --git a/core/fpdfdoc/cpdf_dest.h b/core/fpdfdoc/cpdf_dest.h
index 7f4eb86c0..5e227f86e 100644
--- a/core/fpdfdoc/cpdf_dest.h
+++ b/core/fpdfdoc/cpdf_dest.h
@@ -41,7 +41,7 @@
float* pZoom) const;
private:
- UnownedPtr<const CPDF_Array> const m_pArray;
+ UnownedPtr<const CPDF_Array> m_pArray;
};
#endif // CORE_FPDFDOC_CPDF_DEST_H_
diff --git a/core/fpdfdoc/cpdf_filespec.h b/core/fpdfdoc/cpdf_filespec.h
index 7050f695b..916afed8b 100644
--- a/core/fpdfdoc/cpdf_filespec.h
+++ b/core/fpdfdoc/cpdf_filespec.h
@@ -41,7 +41,7 @@ class CPDF_FileSpec {
private:
UnownedPtr<const CPDF_Object> const m_pObj;
- UnownedPtr<CPDF_Object> const m_pWritableObj;
+ UnownedPtr<CPDF_Object> m_pWritableObj;
};
#endif // CORE_FPDFDOC_CPDF_FILESPEC_H_
|