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

Unified Diff: core/fpdfapi/render/fpdf_render_pattern.cpp

Issue 2449293002: Fix some bool/int mismatches. (Closed)
Patch Set: Created 4 years, 2 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/fpdfapi/render/fpdf_render_pattern.cpp
diff --git a/core/fpdfapi/render/fpdf_render_pattern.cpp b/core/fpdfapi/render/fpdf_render_pattern.cpp
index dfb5669d8f1456c37b0ca4a91852488cf848c41f..f55a0e8b97e0dcf0f0fb232d3b3c2ee86c9c39db 100644
--- a/core/fpdfapi/render/fpdf_render_pattern.cpp
+++ b/core/fpdfapi/render/fpdf_render_pattern.cpp
@@ -54,17 +54,19 @@ void DrawAxialShading(CFX_DIBitmap* pBitmap,
FX_FLOAT start_y = pCoords->GetNumberAt(1);
FX_FLOAT end_x = pCoords->GetNumberAt(2);
FX_FLOAT end_y = pCoords->GetNumberAt(3);
- FX_FLOAT t_min = 0, t_max = 1.0f;
+ FX_FLOAT t_min = 0;
+ FX_FLOAT t_max = 1.0f;
CPDF_Array* pArray = pDict->GetArrayFor("Domain");
if (pArray) {
t_min = pArray->GetNumberAt(0);
t_max = pArray->GetNumberAt(1);
}
- FX_BOOL bStartExtend = FALSE, bEndExtend = FALSE;
+ FX_BOOL bStartExtend = FALSE;
+ FX_BOOL bEndExtend = FALSE;
pArray = pDict->GetArrayFor("Extend");
if (pArray) {
- bStartExtend = pArray->GetIntegerAt(0);
- bEndExtend = pArray->GetIntegerAt(1);
+ bStartExtend = !!pArray->GetIntegerAt(0);
+ bEndExtend = !!pArray->GetIntegerAt(1);
}
int width = pBitmap->GetWidth();
int height = pBitmap->GetHeight();
@@ -139,17 +141,19 @@ void DrawRadialShading(CFX_DIBitmap* pBitmap,
FX_FLOAT end_r = pCoords->GetNumberAt(5);
CFX_Matrix matrix;
matrix.SetReverse(*pObject2Bitmap);
- FX_FLOAT t_min = 0, t_max = 1.0f;
+ FX_FLOAT t_min = 0;
+ FX_FLOAT t_max = 1.0f;
CPDF_Array* pArray = pDict->GetArrayFor("Domain");
if (pArray) {
t_min = pArray->GetNumberAt(0);
t_max = pArray->GetNumberAt(1);
}
- FX_BOOL bStartExtend = FALSE, bEndExtend = FALSE;
+ FX_BOOL bStartExtend = FALSE;
+ FX_BOOL bEndExtend = FALSE;
pArray = pDict->GetArrayFor("Extend");
if (pArray) {
- bStartExtend = pArray->GetIntegerAt(0);
- bEndExtend = pArray->GetIntegerAt(1);
+ bStartExtend = !!pArray->GetIntegerAt(0);
+ bEndExtend = !!pArray->GetIntegerAt(1);
}
uint32_t total_results =
std::max(CountOutputs(funcs), pCS->CountComponents());

Powered by Google App Engine
This is Rietveld 408576698