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

Unified Diff: core/src/fxcodec/jbig2/JBig2_Context.cpp

Issue 1258093002: FX Bool considered harmful, part 3 (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 5 years, 5 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/src/fxcodec/jbig2/JBig2_Context.h ('k') | core/src/fxcodec/jbig2/JBig2_GeneralDecoder.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/src/fxcodec/jbig2/JBig2_Context.cpp
diff --git a/core/src/fxcodec/jbig2/JBig2_Context.cpp b/core/src/fxcodec/jbig2/JBig2_Context.cpp
index 68c973547cd54c24b117f76b546410c75c51ccda..0b71c475c256bad211c7b0d63ec2cda355ec5a9f 100644
--- a/core/src/fxcodec/jbig2/JBig2_Context.cpp
+++ b/core/src/fxcodec/jbig2/JBig2_Context.cpp
@@ -47,7 +47,7 @@ CJBig2_Context::CJBig2_Context(uint8_t *pGlobalData, FX_DWORD dwGlobalLength,
JBIG2_ALLOC(m_pSegmentList, CJBig2_List<CJBig2_Segment>);
JBIG2_ALLOC(m_pPageInfoList, CJBig2_List<JBig2PageInfo>(1));
m_pPage = NULL;
- m_bBufSpecified = FALSE;
+ m_bBufSpecified = false;
m_pPause = pPause;
m_nSegmentDecoded = 0;
m_PauseStep = 10;
@@ -231,11 +231,11 @@ int32_t CJBig2_Context::getFirstPage(uint8_t *pBuf, int32_t width, int32_t heigh
return nRet;
}
}
- m_bFirstPage = TRUE;
+ m_bFirstPage = true;
m_PauseStep = 0;
delete m_pPage;
JBIG2_ALLOC(m_pPage, CJBig2_Image(width, height, stride, pBuf));
- m_bBufSpecified = TRUE;
+ m_bBufSpecified = true;
if(m_pPage && pPause && pPause->NeedToPauseNow()) {
m_PauseStep = 1;
m_ProcessiveStatus = FXCODEC_STATUS_DECODE_TOBECONTINUE;
@@ -298,11 +298,11 @@ int32_t CJBig2_Context::Continue(IFX_Pause* pPause)
int32_t CJBig2_Context::getNextPage(uint8_t *pBuf, int32_t width, int32_t height, int32_t stride, IFX_Pause* pPause)
{
int32_t nRet = JBIG2_ERROR_STREAM_TYPE;
- m_bFirstPage = FALSE;
+ m_bFirstPage = false;
m_PauseStep = 0;
delete m_pPage;
JBIG2_ALLOC(m_pPage, CJBig2_Image(width, height, stride, pBuf));
- m_bBufSpecified = TRUE;
+ m_bBufSpecified = true;
if(m_pPage && pPause && pPause->NeedToPauseNow()) {
m_PauseStep = 1;
m_ProcessiveStatus = FXCODEC_STATUS_DECODE_TOBECONTINUE;
@@ -330,7 +330,7 @@ int32_t CJBig2_Context::getNextPage(uint8_t *pBuf, int32_t width, int32_t height
int32_t CJBig2_Context::getFirstPage(CJBig2_Image **image, IFX_Pause* pPause)
{
int32_t nRet;
- m_bFirstPage = TRUE;
+ m_bFirstPage = true;
m_PauseStep = 0;
if(m_pGlobalContext) {
nRet = m_pGlobalContext->decode_EmbedOrgnazation(pPause);
@@ -338,14 +338,14 @@ int32_t CJBig2_Context::getFirstPage(CJBig2_Image **image, IFX_Pause* pPause)
return nRet;
}
}
- m_bBufSpecified = FALSE;
+ m_bBufSpecified = false;
return Continue(pPause);
}
int32_t CJBig2_Context::getNextPage(CJBig2_Image **image, IFX_Pause* pPause)
{
int32_t nRet;
- m_bBufSpecified = FALSE;
- m_bFirstPage = FALSE;
+ m_bBufSpecified = false;
+ m_bFirstPage = false;
m_PauseStep = 0;
switch(m_nStreamType) {
case JBIG2_FILE_STREAM:
@@ -601,14 +601,14 @@ int32_t CJBig2_Context::parseSymbolDict(CJBig2_Segment *pSegment, IFX_Pause* pPa
CJBig2_HuffmanTable *Table_B1 = NULL, *Table_B2 = NULL, *Table_B3 = NULL, *Table_B4 = NULL, *Table_B5 = NULL;
int32_t i, nIndex, nRet;
CJBig2_Segment *pSeg = NULL, *pLRSeg = NULL;
- FX_BOOL bUsed;
+ bool bUsed;
CJBig2_Image ** SDINSYMS = NULL;
CJBig2_SDDProc *pSymbolDictDecoder;
JBig2ArithCtx *gbContext = NULL, *grContext = NULL;
CJBig2_ArithDecoder *pArithDecoder;
JBIG2_ALLOC(pSymbolDictDecoder, CJBig2_SDDProc());
uint8_t *key = pSegment->m_pData;
- FX_BOOL cache_hit = false;
+ bool cache_hit = false;
if(m_pStream->readShortInteger(&wFlags) != 0) {
m_pModule->JBig2_Error("symbol dictionary segment : data header too short.");
nRet = JBIG2_ERROR_TOO_SHORT;
@@ -825,16 +825,16 @@ int32_t CJBig2_Context::parseSymbolDict(CJBig2_Segment *pSegment, IFX_Pause* pPa
}
}
if(wFlags & 0x0200) {
- pSegment->m_Result.sd->m_bContextRetained = TRUE;
+ pSegment->m_Result.sd->m_bContextRetained = true;
if(pSymbolDictDecoder->SDHUFF == 0) {
pSegment->m_Result.sd->m_gbContext = gbContext;
}
if(pSymbolDictDecoder->SDREFAGG == 1) {
pSegment->m_Result.sd->m_grContext = grContext;
}
- bUsed = TRUE;
+ bUsed = true;
} else {
- bUsed = FALSE;
+ bUsed = false;
}
delete pSymbolDictDecoder;
if(SDINSYMS) {
@@ -845,7 +845,7 @@ int32_t CJBig2_Context::parseSymbolDict(CJBig2_Segment *pSegment, IFX_Pause* pPa
delete Table_B3;
delete Table_B4;
delete Table_B5;
- if(bUsed == FALSE) {
+ if(bUsed == false) {
if(gbContext) {
m_pModule->JBig2_Free(gbContext);
}
« no previous file with comments | « core/src/fxcodec/jbig2/JBig2_Context.h ('k') | core/src/fxcodec/jbig2/JBig2_GeneralDecoder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698