summaryrefslogtreecommitdiff
path: root/core/fpdfapi/fpdf_render
diff options
context:
space:
mode:
authorweili <weili@chromium.org>2016-06-02 15:48:15 -0700
committerCommit bot <commit-bot@chromium.org>2016-06-02 15:48:16 -0700
commitdb444d2063df6c574882d9263e885c4fe1134133 (patch)
tree27ce4a3f181ae0b5ad4eff6893016e7d49dfce0a /core/fpdfapi/fpdf_render
parentad700c2c1fc3c3843dae71e5982f462e42efc987 (diff)
downloadpdfium-db444d2063df6c574882d9263e885c4fe1134133.tar.xz
Fix all the code which has duplicate variable declarations
When there are duplicate variable declarations, the inner names shadow the outter ones. This is error prone and harder to read. Remove all the instances found by /analyze. BUG=chromium:613623, chromium:427616 Review-Url: https://codereview.chromium.org/2027273002
Diffstat (limited to 'core/fpdfapi/fpdf_render')
-rw-r--r--core/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/core/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp b/core/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp
index 75f6a231a4..4071a115df 100644
--- a/core/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp
+++ b/core/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp
@@ -381,7 +381,7 @@ int CPDF_DIBSource::ContinueLoadDIBSource(IFX_Pause* pPause) {
}
return ret1;
}
- FXCODEC_STATUS ret = pJbig2Module->ContinueDecode(m_pJbig2Context, pPause);
+ ret = pJbig2Module->ContinueDecode(m_pJbig2Context, pPause);
if (ret < 0) {
m_pCachedBitmap.reset();
m_pGlobalStream.reset();
@@ -864,8 +864,8 @@ void CPDF_DIBSource::LoadPalette() {
m_pColorSpace->CountComponents() > 1) {
int nComponents = m_pColorSpace->CountComponents();
std::vector<FX_FLOAT> temp_buf(nComponents);
- for (int i = 0; i < nComponents; i++) {
- temp_buf[i] = *color_value;
+ for (int k = 0; k < nComponents; k++) {
+ temp_buf[k] = *color_value;
}
m_pColorSpace->GetRGB(temp_buf.data(), R, G, B);
} else {