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

Unified Diff: core/fxge/dib/fx_dib_convert.cpp

Issue 2027273002: Fix all the code which has duplicate variable declarations (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: rebase Created 4 years, 7 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/fxge/dib/fx_dib_composite.cpp ('k') | core/fxge/dib/fx_dib_transform.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/fxge/dib/fx_dib_convert.cpp
diff --git a/core/fxge/dib/fx_dib_convert.cpp b/core/fxge/dib/fx_dib_convert.cpp
index da380ee5672e5e6ccab315188bbb40918701175c..8937816531fb245cbb8bbe42890f6118c0e67ca6 100644
--- a/core/fxge/dib/fx_dib_convert.cpp
+++ b/core/fxge/dib/fx_dib_convert.cpp
@@ -433,7 +433,6 @@ FX_BOOL ConvertBuffer_Rgb2PltRgb8_NoTransform(uint8_t* dest_buf,
int src_top,
uint32_t* dst_plt) {
int bpp = pSrcBitmap->GetBPP() / 8;
- int row, col;
CFX_Palette palette;
palette.BuildPalette(pSrcBitmap);
uint32_t* cLut = palette.GetColorLut();
@@ -446,7 +445,7 @@ FX_BOOL ConvertBuffer_Rgb2PltRgb8_NoTransform(uint8_t* dest_buf,
if (lut > 256) {
int err, min_err;
int lut_256 = lut - 256;
- for (row = 0; row < lut_256; row++) {
+ for (int row = 0; row < lut_256; row++) {
min_err = 1000000;
uint8_t r, g, b;
_ColorDecode(cLut[row], r, g, b);
@@ -466,11 +465,11 @@ FX_BOOL ConvertBuffer_Rgb2PltRgb8_NoTransform(uint8_t* dest_buf,
}
}
int32_t lut_1 = lut - 1;
- for (row = 0; row < height; row++) {
+ for (int row = 0; row < height; row++) {
uint8_t* src_scan =
(uint8_t*)pSrcBitmap->GetScanline(src_top + row) + src_left;
uint8_t* dest_scan = dest_buf + row * dest_pitch;
- for (col = 0; col < width; col++) {
+ for (int col = 0; col < width; col++) {
uint8_t* src_port = src_scan + col * bpp;
int r = src_port[2] & 0xf0;
int g = src_port[1] & 0xf0;
« no previous file with comments | « core/fxge/dib/fx_dib_composite.cpp ('k') | core/fxge/dib/fx_dib_transform.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698