summaryrefslogtreecommitdiff
path: root/core/fpdfapi/page/cpdf_patterncs.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/fpdfapi/page/cpdf_patterncs.cpp')
-rw-r--r--core/fpdfapi/page/cpdf_patterncs.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/core/fpdfapi/page/cpdf_patterncs.cpp b/core/fpdfapi/page/cpdf_patterncs.cpp
index b4b680f026..5da176984b 100644
--- a/core/fpdfapi/page/cpdf_patterncs.cpp
+++ b/core/fpdfapi/page/cpdf_patterncs.cpp
@@ -50,10 +50,13 @@ uint32_t CPDF_PatternCS::v_Load(CPDF_Document* pDoc,
return m_pBaseCS->CountComponents() + 1;
}
-bool CPDF_PatternCS::GetRGB(float* pBuf, float* R, float* G, float* B) const {
+bool CPDF_PatternCS::GetRGB(const float* pBuf,
+ float* R,
+ float* G,
+ float* B) const {
if (m_pBaseCS) {
ASSERT(m_pBaseCS->GetFamily() != PDFCS_PATTERN);
- PatternValue* pvalue = reinterpret_cast<PatternValue*>(pBuf);
+ const auto* pvalue = reinterpret_cast<const PatternValue*>(pBuf);
if (m_pBaseCS->GetRGB(pvalue->m_Comps, R, G, B))
return true;
}