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

Unified Diff: core/src/fpdfapi/fpdf_render/fpdf_render_image.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
« no previous file with comments | « core/src/fpdfapi/fpdf_page/pageint.h ('k') | core/src/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/src/fpdfapi/fpdf_render/fpdf_render_image.cpp
diff --git a/core/src/fpdfapi/fpdf_render/fpdf_render_image.cpp b/core/src/fpdfapi/fpdf_render/fpdf_render_image.cpp
index 0f9b88e638ea107e62079dc01f4880b5235e0425..3be74c5ce846c46f5c5ce8e367ae75e64d7de4f6 100644
--- a/core/src/fpdfapi/fpdf_render/fpdf_render_image.cpp
+++ b/core/src/fpdfapi/fpdf_render/fpdf_render_image.cpp
@@ -917,8 +917,8 @@ CFX_DIBitmap* CPDF_RenderStatus::LoadSMask(CPDF_Dictionary* pSMaskDict,
if (pCS) {
FX_FLOAT R, G, B;
FX_DWORD comps = 8;
- if (pCS->CountComponents() > static_cast<int32_t>(comps)) {
- comps = (FX_DWORD)pCS->CountComponents();
+ if (pCS->CountComponents() > comps) {
+ comps = pCS->CountComponents();
}
CFX_FixedBufGrow<FX_FLOAT, 8> float_array(comps);
FX_FLOAT* pFloats = float_array;
« no previous file with comments | « core/src/fpdfapi/fpdf_page/pageint.h ('k') | core/src/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698