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

Unified Diff: xfa/fde/xml/cfx_saxreader.cpp

Issue 2467203003: Remove FX_BOOL from xfa. (Closed)
Patch Set: Created 4 years, 1 month 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 | « xfa/fde/xml/cfx_saxreader.h ('k') | xfa/fde/xml/fde_xml.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: xfa/fde/xml/cfx_saxreader.cpp
diff --git a/xfa/fde/xml/cfx_saxreader.cpp b/xfa/fde/xml/cfx_saxreader.cpp
index 8f18451ea05230bf3caa023e8b1805dc3843863b..b4d48d29379436c2db2e95a514cb7836fa4e8638 100644
--- a/xfa/fde/xml/cfx_saxreader.cpp
+++ b/xfa/fde/xml/cfx_saxreader.cpp
@@ -70,45 +70,45 @@ CFX_SAXFile::CFX_SAXFile()
m_pBuf(nullptr),
m_dwBufSize(0),
m_dwBufIndex(0) {}
-FX_BOOL CFX_SAXFile::StartFile(IFX_SeekableReadStream* pFile,
- uint32_t dwStart,
- uint32_t dwLen) {
+bool CFX_SAXFile::StartFile(IFX_SeekableReadStream* pFile,
+ uint32_t dwStart,
+ uint32_t dwLen) {
ASSERT(!m_pFile && pFile);
uint32_t dwSize = pFile->GetSize();
if (dwStart >= dwSize) {
- return FALSE;
+ return false;
}
if (dwLen == static_cast<uint32_t>(-1) || dwStart + dwLen > dwSize) {
dwLen = dwSize - dwStart;
}
if (dwLen == 0) {
- return FALSE;
+ return false;
}
m_dwBufSize = std::min(dwLen, kSaxFileBufSize);
m_pBuf = FX_Alloc(uint8_t, m_dwBufSize);
if (!pFile->ReadBlock(m_pBuf, dwStart, m_dwBufSize)) {
- return FALSE;
+ return false;
}
m_dwStart = dwStart;
m_dwEnd = dwStart + dwLen;
m_dwCur = dwStart;
m_pFile = pFile;
m_dwBufIndex = 0;
- return TRUE;
+ return true;
}
-FX_BOOL CFX_SAXFile::ReadNextBlock() {
+bool CFX_SAXFile::ReadNextBlock() {
ASSERT(m_pFile);
uint32_t dwSize = m_dwEnd - m_dwCur;
if (dwSize == 0) {
- return FALSE;
+ return false;
}
m_dwBufSize = std::min(dwSize, kSaxFileBufSize);
if (!m_pFile->ReadBlock(m_pBuf, m_dwCur, m_dwBufSize)) {
- return FALSE;
+ return false;
}
m_dwBufIndex = 0;
- return TRUE;
+ return true;
}
void CFX_SAXFile::Reset() {
@@ -210,7 +210,7 @@ void CFX_SAXReader::ReallocNameBuffer() {
m_pszName = (uint8_t*)FX_Realloc(uint8_t, m_pszName, m_iNameSize);
}
-FX_BOOL CFX_SAXReader::SkipSpace(uint8_t ch) {
+bool CFX_SAXReader::SkipSpace(uint8_t ch) {
return (m_dwParseMode & CFX_SaxParseMode_NotSkipSpace) == 0 && ch < 0x21;
}
@@ -226,7 +226,7 @@ int32_t CFX_SAXReader::StartParse(IFX_SeekableReadStream* pFile,
m_iState = 0;
m_eMode = CFX_SaxMode::Text;
m_ePrevMode = CFX_SaxMode::Text;
- m_bCharData = FALSE;
+ m_bCharData = false;
m_dwDataOffset = 0;
m_dwParseMode = dwParseMode;
m_Stack.emplace(new CFX_SAXItem(++m_dwItemID));
@@ -637,11 +637,11 @@ void CFX_SAXReader::SkipNode() {
m_dwDataOffset += 7;
FXSYS_memmove(m_pszData, m_pszData + 7,
m_iDataLength * sizeof(uint8_t));
- m_bCharData = TRUE;
+ m_bCharData = true;
if (m_pHandler) {
NotifyData();
}
- m_bCharData = FALSE;
+ m_bCharData = false;
} else {
Pop();
}
@@ -728,7 +728,7 @@ void CFX_SAXReader::SkipCurrentNode() {
if (!pItem)
return;
- pItem->m_bSkip = TRUE;
+ pItem->m_bSkip = true;
}
void CFX_SAXReader::SetHandler(CXFA_SAXReaderHandler* pHandler) {
« no previous file with comments | « xfa/fde/xml/cfx_saxreader.h ('k') | xfa/fde/xml/fde_xml.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698