Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2993)

Unified Diff: core/src/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp

Issue 1783933002: Change colorspace's number of components to be unsigned (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: address comments Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: core/src/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp
diff --git a/core/src/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp b/core/src/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp
index 709733c56ff97c84d12b2ebced9b5fd531dc4f08..72472ef8fbfc36f3db86c8b637d04093fe25f6f6 100644
--- a/core/src/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp
+++ b/core/src/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp
@@ -709,7 +709,7 @@ void CPDF_DIBSource::LoadJpxBitmap() {
FX_BOOL bSwapRGB = FALSE;
if (m_pColorSpace) {
- if (components != (FX_DWORD)m_pColorSpace->CountComponents())
+ if (components != m_pColorSpace->CountComponents())
return;
if (m_pColorSpace == CPDF_ColorSpace::GetStockCS(PDFCS_DEVICERGB)) {
@@ -776,7 +776,7 @@ CPDF_DIBSource* CPDF_DIBSource::LoadMask(FX_DWORD& MatteColor) {
if (pSoftMask) {
CPDF_Array* pMatte = pSoftMask->GetDict()->GetArrayBy("Matte");
if (pMatte && m_pColorSpace &&
- (FX_DWORD)m_pColorSpace->CountComponents() <= m_nComponents) {
+ m_pColorSpace->CountComponents() <= m_nComponents) {
std::vector<FX_FLOAT> colors(m_nComponents);
for (FX_DWORD i = 0; i < m_nComponents; i++) {
colors[i] = pMatte->GetFloatAt(i);
@@ -801,7 +801,7 @@ int CPDF_DIBSource::StratLoadMask() {
if (m_pMaskStream) {
CPDF_Array* pMatte = m_pMaskStream->GetDict()->GetArrayBy("Matte");
if (pMatte && m_pColorSpace &&
- (FX_DWORD)m_pColorSpace->CountComponents() <= m_nComponents) {
+ m_pColorSpace->CountComponents() <= m_nComponents) {
FX_FLOAT R, G, B;
std::vector<FX_FLOAT> colors(m_nComponents);
for (FX_DWORD i = 0; i < m_nComponents; i++) {
« no previous file with comments | « core/src/fpdfapi/fpdf_render/fpdf_render_image.cpp ('k') | core/src/fpdfapi/fpdf_render/fpdf_render_pattern.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698