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

Unified Diff: core/fxcodec/jbig2/JBig2_GrdProc.cpp

Issue 2034253003: Fix more code which has shadow variables (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 4 years, 6 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/fxcodec/jbig2/JBig2_GrdProc.cpp
diff --git a/core/fxcodec/jbig2/JBig2_GrdProc.cpp b/core/fxcodec/jbig2/JBig2_GrdProc.cpp
index 2391fb2b07a24a07d0cd2d9d3e0432b135d0ff8f..d8d181eed821a0544a4076d4d5719ffe3dc097a3 100644
--- a/core/fxcodec/jbig2/JBig2_GrdProc.cpp
+++ b/core/fxcodec/jbig2/JBig2_GrdProc.cpp
@@ -18,7 +18,7 @@ CJBig2_GRDProc::CJBig2_GRDProc()
m_pLine(nullptr),
m_pPause(nullptr),
m_DecodeType(0),
- LTP(0) {
+ m_LTP(0) {
dsinclair 2016/06/06 12:50:11 nit: FALSE
Wei Li 2016/06/07 17:33:53 Done.
m_ReplaceRect.left = 0;
m_ReplaceRect.bottom = 0;
m_ReplaceRect.top = 0;
@@ -606,7 +606,7 @@ FXCODEC_STATUS CJBig2_GRDProc::Start_decode_Arith(
(*m_pImage)->fill(0);
m_pArithDecoder = pArithDecoder;
m_gbContext = gbContext;
- LTP = 0;
+ m_LTP = 0;
dsinclair 2016/06/06 12:50:10 nit: FALSE
Wei Li 2016/06/07 17:33:52 Done.
m_pLine = nullptr;
m_loopIndex = 0;
return decode_Arith(pPause);
@@ -714,9 +714,9 @@ FXCODEC_STATUS CJBig2_GRDProc::decode_Arith_Template0_opt3(
for (; m_loopIndex < height; m_loopIndex++) {
if (TPGDON) {
SLTP = pArithDecoder->DECODE(&gbContext[0x9b25]);
- LTP = LTP ^ SLTP;
+ m_LTP = m_LTP ^ SLTP;
}
- if (LTP == 1) {
+ if (m_LTP == 1) {
dsinclair 2016/06/06 12:50:10 nit: TRUE (and others below)
Tom Sepez 2016/06/06 16:43:33 just if (m_LTP) {
Wei Li 2016/06/07 17:33:53 Done.
pImage->copyLine(m_loopIndex, m_loopIndex - 1);
} else {
if (m_loopIndex > 1) {
@@ -798,9 +798,9 @@ FXCODEC_STATUS CJBig2_GRDProc::decode_Arith_Template0_unopt(
for (; m_loopIndex < GBH; m_loopIndex++) {
if (TPGDON) {
SLTP = pArithDecoder->DECODE(&gbContext[0x9b25]);
- LTP = LTP ^ SLTP;
+ m_LTP = m_LTP ^ SLTP;
}
- if (LTP == 1) {
+ if (m_LTP == 1) {
pImage->copyLine(m_loopIndex, m_loopIndex - 1);
} else {
line1 = pImage->getPixel(1, m_loopIndex - 2);
@@ -863,9 +863,9 @@ FXCODEC_STATUS CJBig2_GRDProc::decode_Arith_Template1_opt3(
for (; m_loopIndex < GBH; m_loopIndex++) {
if (TPGDON) {
SLTP = pArithDecoder->DECODE(&gbContext[0x0795]);
- LTP = LTP ^ SLTP;
+ m_LTP = m_LTP ^ SLTP;
}
- if (LTP == 1) {
+ if (m_LTP == 1) {
pImage->copyLine(m_loopIndex, m_loopIndex - 1);
} else {
if (m_loopIndex > 1) {
@@ -947,9 +947,9 @@ FXCODEC_STATUS CJBig2_GRDProc::decode_Arith_Template1_unopt(
for (uint32_t h = 0; h < GBH; h++) {
if (TPGDON) {
SLTP = pArithDecoder->DECODE(&gbContext[0x0795]);
- LTP = LTP ^ SLTP;
+ m_LTP = m_LTP ^ SLTP;
}
- if (LTP == 1) {
+ if (m_LTP == 1) {
pImage->copyLine(h, h - 1);
} else {
line1 = pImage->getPixel(2, h - 2);
@@ -1008,9 +1008,9 @@ FXCODEC_STATUS CJBig2_GRDProc::decode_Arith_Template2_opt3(
for (; m_loopIndex < GBH; m_loopIndex++) {
if (TPGDON) {
SLTP = pArithDecoder->DECODE(&gbContext[0x00e5]);
- LTP = LTP ^ SLTP;
+ m_LTP = m_LTP ^ SLTP;
}
- if (LTP == 1) {
+ if (m_LTP == 1) {
pImage->copyLine(m_loopIndex, m_loopIndex - 1);
} else {
if (m_loopIndex > 1) {
@@ -1092,9 +1092,9 @@ FXCODEC_STATUS CJBig2_GRDProc::decode_Arith_Template2_unopt(
for (; m_loopIndex < GBH; m_loopIndex++) {
if (TPGDON) {
SLTP = pArithDecoder->DECODE(&gbContext[0x00e5]);
- LTP = LTP ^ SLTP;
+ m_LTP = m_LTP ^ SLTP;
}
- if (LTP == 1) {
+ if (m_LTP == 1) {
pImage->copyLine(m_loopIndex, m_loopIndex - 1);
} else {
line1 = pImage->getPixel(1, m_loopIndex - 2);
@@ -1152,9 +1152,9 @@ FXCODEC_STATUS CJBig2_GRDProc::decode_Arith_Template3_opt3(
for (; m_loopIndex < GBH; m_loopIndex++) {
if (TPGDON) {
SLTP = pArithDecoder->DECODE(&gbContext[0x0195]);
- LTP = LTP ^ SLTP;
+ m_LTP = m_LTP ^ SLTP;
}
- if (LTP == 1) {
+ if (m_LTP == 1) {
pImage->copyLine(m_loopIndex, m_loopIndex - 1);
} else {
if (m_loopIndex > 0) {
@@ -1223,9 +1223,9 @@ FXCODEC_STATUS CJBig2_GRDProc::decode_Arith_Template3_unopt(
for (; m_loopIndex < GBH; m_loopIndex++) {
if (TPGDON) {
SLTP = pArithDecoder->DECODE(&gbContext[0x0195]);
- LTP = LTP ^ SLTP;
+ m_LTP = m_LTP ^ SLTP;
}
- if (LTP == 1) {
+ if (m_LTP == 1) {
pImage->copyLine(m_loopIndex, m_loopIndex - 1);
} else {
line1 = pImage->getPixel(1, m_loopIndex - 1);

Powered by Google App Engine
This is Rietveld 408576698