summaryrefslogtreecommitdiff
path: root/core/src/fxcrt/xml_int.h
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2015-07-23 13:26:26 -0700
committerTom Sepez <tsepez@chromium.org>2015-07-23 13:26:26 -0700
commit320b2313d19869333ed453af546e61a9fc2b81c9 (patch)
tree25f2eb8a0991ac485ca6354f0d3caf7fd775e732 /core/src/fxcrt/xml_int.h
parent065e9321b84fc0490f3da9099e8840c65e06868d (diff)
downloadpdfium-320b2313d19869333ed453af546e61a9fc2b81c9.tar.xz
FX_BOOL considered harmful, part 2.
Fully automatic change, execpt for cleanup in fx_system.h R=thestig@chromium.org Review URL: https://codereview.chromium.org/1254703002 .
Diffstat (limited to 'core/src/fxcrt/xml_int.h')
-rw-r--r--core/src/fxcrt/xml_int.h38
1 files changed, 19 insertions, 19 deletions
diff --git a/core/src/fxcrt/xml_int.h b/core/src/fxcrt/xml_int.h
index 109c7a43d2..ec8bdc2850 100644
--- a/core/src/fxcrt/xml_int.h
+++ b/core/src/fxcrt/xml_int.h
@@ -23,7 +23,7 @@ public:
{
delete this;
}
- virtual FX_BOOL IsEOF()
+ virtual bool IsEOF()
{
return m_dwCurPos >= m_dwSize;
}
@@ -35,16 +35,16 @@ public:
{
return 0;
}
- virtual FX_BOOL ReadNextBlock(FX_BOOL bRestart = FALSE)
+ virtual bool ReadNextBlock(bool bRestart = false)
{
if (bRestart) {
m_dwCurPos = 0;
}
if (m_dwCurPos < m_dwSize) {
m_dwCurPos = m_dwSize;
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
virtual const uint8_t* GetBlockBuffer()
{
@@ -85,7 +85,7 @@ public:
{
delete this;
}
- virtual FX_BOOL IsEOF()
+ virtual bool IsEOF()
{
return m_nStart + (FX_FILESIZE)m_dwSize >= m_pFileRead->GetSize();
}
@@ -97,7 +97,7 @@ public:
{
return 0;
}
- virtual FX_BOOL ReadNextBlock(FX_BOOL bRestart = FALSE)
+ virtual bool ReadNextBlock(bool bRestart = false)
{
if (bRestart) {
m_nStart = 0;
@@ -105,7 +105,7 @@ public:
FX_FILESIZE nLength = m_pFileRead->GetSize();
m_nStart += (FX_FILESIZE)m_dwSize;
if (m_nStart >= nLength) {
- return FALSE;
+ return false;
}
m_dwSize = (size_t)FX_MIN(FX_XMLDATASTREAM_BufferSize, nLength - m_nStart);
if (!m_pBuffer) {
@@ -136,28 +136,28 @@ class CXML_Parser
public:
~CXML_Parser();
IFX_BufferRead* m_pDataAcc;
- FX_BOOL m_bOwnedStream;
+ bool m_bOwnedStream;
FX_FILESIZE m_nOffset;
- FX_BOOL m_bSaveSpaceChars;
+ bool m_bSaveSpaceChars;
const uint8_t* m_pBuffer;
size_t m_dwBufferSize;
FX_FILESIZE m_nBufferOffset;
size_t m_dwIndex;
- FX_BOOL Init(uint8_t* pBuffer, size_t size);
- FX_BOOL Init(IFX_FileRead *pFileRead);
- FX_BOOL Init(IFX_BufferRead *pBuffer);
- FX_BOOL Init(FX_BOOL bOwndedStream);
- FX_BOOL ReadNextBlock();
- FX_BOOL IsEOF();
- FX_BOOL HaveAvailData();
+ bool Init(uint8_t* pBuffer, size_t size);
+ bool Init(IFX_FileRead *pFileRead);
+ bool Init(IFX_BufferRead *pBuffer);
+ bool Init(bool bOwndedStream);
+ bool ReadNextBlock();
+ bool IsEOF();
+ bool HaveAvailData();
void SkipWhiteSpaces();
void GetName(CFX_ByteString& space, CFX_ByteString& name);
void GetAttrValue(CFX_WideString &value);
FX_DWORD GetCharRef();
- void GetTagName(CFX_ByteString &space, CFX_ByteString &name, FX_BOOL &bEndTag, FX_BOOL bStartTag = FALSE);
+ void GetTagName(CFX_ByteString &space, CFX_ByteString &name, bool &bEndTag, bool bStartTag = false);
void SkipLiterals(const CFX_ByteStringC& str);
- CXML_Element* ParseElement(CXML_Element* pParent, FX_BOOL bStartTag = FALSE);
- void InsertContentSegment(FX_BOOL bCDATA, const CFX_WideStringC& content, CXML_Element* pElement);
+ CXML_Element* ParseElement(CXML_Element* pParent, bool bStartTag = false);
+ void InsertContentSegment(bool bCDATA, const CFX_WideStringC& content, CXML_Element* pElement);
void InsertCDATASegment(CFX_UTF8Decoder& decoder, CXML_Element* pElement);
};
void FX_XML_SplitQualifiedName(const CFX_ByteStringC& bsFullName, CFX_ByteStringC &bsSpace, CFX_ByteStringC &bsName);