summaryrefslogtreecommitdiff
path: root/core/src/fxcodec/jbig2/JBig2_GeneralDecoder.cpp
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2015-08-28 23:43:11 -0700
committerLei Zhang <thestig@chromium.org>2015-08-28 23:43:11 -0700
commit5e4a5cc9ad76dc08d62fb1e10bdfb811f3720c43 (patch)
treeaa72701e155894a6909cdf99475c6947cab51ccf /core/src/fxcodec/jbig2/JBig2_GeneralDecoder.cpp
parent463b77b4f1e4257cd89f3460b5a6fdb102f44265 (diff)
downloadpdfium-5e4a5cc9ad76dc08d62fb1e10bdfb811f3720c43.tar.xz
Replace signed char with int8_t. Fix Linux ARM build after r7830e9e.
TBR=tsepez@chromium.org Review URL: https://codereview.chromium.org/1321883002 .
Diffstat (limited to 'core/src/fxcodec/jbig2/JBig2_GeneralDecoder.cpp')
-rw-r--r--core/src/fxcodec/jbig2/JBig2_GeneralDecoder.cpp30
1 files changed, 14 insertions, 16 deletions
diff --git a/core/src/fxcodec/jbig2/JBig2_GeneralDecoder.cpp b/core/src/fxcodec/jbig2/JBig2_GeneralDecoder.cpp
index 33b88bf2ba..a4100320cb 100644
--- a/core/src/fxcodec/jbig2/JBig2_GeneralDecoder.cpp
+++ b/core/src/fxcodec/jbig2/JBig2_GeneralDecoder.cpp
@@ -39,28 +39,27 @@ CJBig2_Image* CJBig2_GRDProc::decode_Arith(CJBig2_ArithDecoder* pArithDecoder,
return pImage;
}
if (GBTEMPLATE == 0) {
- if ((GBAT[0] == 3) && (GBAT[1] == (signed char)-1) &&
- (GBAT[2] == (signed char)-3) && (GBAT[3] == (signed char)-1) &&
- (GBAT[4] == 2) && (GBAT[5] == (signed char)-2) &&
- (GBAT[6] == (signed char)-2) && (GBAT[7] == (signed char)-2)) {
+ if ((GBAT[0] == 3) && (GBAT[1] == (int8_t)-1) && (GBAT[2] == (int8_t)-3) &&
+ (GBAT[3] == (int8_t)-1) && (GBAT[4] == 2) && (GBAT[5] == (int8_t)-2) &&
+ (GBAT[6] == (int8_t)-2) && (GBAT[7] == (int8_t)-2)) {
return decode_Arith_Template0_opt3(pArithDecoder, gbContext);
} else {
return decode_Arith_Template0_unopt(pArithDecoder, gbContext);
}
} else if (GBTEMPLATE == 1) {
- if ((GBAT[0] == 3) && (GBAT[1] == (signed char)-1)) {
+ if ((GBAT[0] == 3) && (GBAT[1] == (int8_t)-1)) {
return decode_Arith_Template1_opt3(pArithDecoder, gbContext);
} else {
return decode_Arith_Template1_unopt(pArithDecoder, gbContext);
}
} else if (GBTEMPLATE == 2) {
- if ((GBAT[0] == 2) && (GBAT[1] == (signed char)-1)) {
+ if ((GBAT[0] == 2) && (GBAT[1] == (int8_t)-1)) {
return decode_Arith_Template2_opt3(pArithDecoder, gbContext);
} else {
return decode_Arith_Template2_unopt(pArithDecoder, gbContext);
}
} else {
- if ((GBAT[0] == 2) && (GBAT[1] == (signed char)-1)) {
+ if ((GBAT[0] == 2) && (GBAT[1] == (int8_t)-1)) {
return decode_Arith_Template3_opt3(pArithDecoder, gbContext);
} else {
return decode_Arith_Template3_unopt(pArithDecoder, gbContext);
@@ -1067,8 +1066,8 @@ CJBig2_Image* CJBig2_GRRDProc::decode(CJBig2_ArithDecoder* pArithDecoder,
return pImage;
}
if (GRTEMPLATE == 0) {
- if ((GRAT[0] == (signed char)-1) && (GRAT[1] == (signed char)-1) &&
- (GRAT[2] == (signed char)-1) && (GRAT[3] == (signed char)-1) &&
+ if ((GRAT[0] == (int8_t)-1) && (GRAT[1] == (int8_t)-1) &&
+ (GRAT[2] == (int8_t)-1) && (GRAT[3] == (int8_t)-1) &&
(GRREFERENCEDX == 0) && (GRW == (FX_DWORD)GRREFERENCE->m_nWidth)) {
return decode_Template0_opt(pArithDecoder, grContext);
} else {
@@ -3247,10 +3246,9 @@ FXCODEC_STATUS CJBig2_GRDProc::decode_Arith(IFX_Pause* pPause) {
int iline = m_loopIndex;
CJBig2_Image* pImage = *m_pImage;
if (GBTEMPLATE == 0) {
- if ((GBAT[0] == 3) && (GBAT[1] == (signed char)-1) &&
- (GBAT[2] == (signed char)-3) && (GBAT[3] == (signed char)-1) &&
- (GBAT[4] == 2) && (GBAT[5] == (signed char)-2) &&
- (GBAT[6] == (signed char)-2) && (GBAT[7] == (signed char)-2)) {
+ if ((GBAT[0] == 3) && (GBAT[1] == (int8_t)-1) && (GBAT[2] == (int8_t)-3) &&
+ (GBAT[3] == (int8_t)-1) && (GBAT[4] == 2) && (GBAT[5] == (int8_t)-2) &&
+ (GBAT[6] == (int8_t)-2) && (GBAT[7] == (int8_t)-2)) {
m_ProssiveStatus = decode_Arith_Template0_opt3(pImage, m_pArithDecoder,
m_gbContext, pPause);
} else {
@@ -3258,7 +3256,7 @@ FXCODEC_STATUS CJBig2_GRDProc::decode_Arith(IFX_Pause* pPause) {
m_gbContext, pPause);
}
} else if (GBTEMPLATE == 1) {
- if ((GBAT[0] == 3) && (GBAT[1] == (signed char)-1)) {
+ if ((GBAT[0] == 3) && (GBAT[1] == (int8_t)-1)) {
m_ProssiveStatus = decode_Arith_Template1_opt3(pImage, m_pArithDecoder,
m_gbContext, pPause);
} else {
@@ -3266,7 +3264,7 @@ FXCODEC_STATUS CJBig2_GRDProc::decode_Arith(IFX_Pause* pPause) {
m_gbContext, pPause);
}
} else if (GBTEMPLATE == 2) {
- if ((GBAT[0] == 2) && (GBAT[1] == (signed char)-1)) {
+ if ((GBAT[0] == 2) && (GBAT[1] == (int8_t)-1)) {
m_ProssiveStatus = decode_Arith_Template2_opt3(pImage, m_pArithDecoder,
m_gbContext, pPause);
} else {
@@ -3274,7 +3272,7 @@ FXCODEC_STATUS CJBig2_GRDProc::decode_Arith(IFX_Pause* pPause) {
m_gbContext, pPause);
}
} else {
- if ((GBAT[0] == 2) && (GBAT[1] == (signed char)-1)) {
+ if ((GBAT[0] == 2) && (GBAT[1] == (int8_t)-1)) {
m_ProssiveStatus = decode_Arith_Template3_opt3(pImage, m_pArithDecoder,
m_gbContext, pPause);
} else {