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

Unified Diff: core/include/fpdfapi/fpdf_objects.h

Issue 1254703002: FX_BOOL considered harmful, part 2. (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/include/fpdfapi/fpdf_module.h ('k') | core/include/fpdfapi/fpdf_page.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/include/fpdfapi/fpdf_objects.h
diff --git a/core/include/fpdfapi/fpdf_objects.h b/core/include/fpdfapi/fpdf_objects.h
index 45b7cc63cb04c5357d7a3b2514e5a4d0b5dd53f4..8d954ff7196db3237ea9eb9f001bb9989d8f3831 100644
--- a/core/include/fpdfapi/fpdf_objects.h
+++ b/core/include/fpdfapi/fpdf_objects.h
@@ -57,9 +57,9 @@ public:
return m_GenNum;
}
- FX_BOOL IsIdentical(CPDF_Object* pObj) const;
+ bool IsIdentical(CPDF_Object* pObj) const;
- CPDF_Object* Clone(FX_BOOL bDirect = FALSE) const;
+ CPDF_Object* Clone(bool bDirect = false) const;
CPDF_Object* CloneRef(CPDF_IndirectObjects* pObjs) const;
@@ -88,9 +88,9 @@ public:
int GetDirectType() const;
- FX_BOOL IsModified() const
+ bool IsModified() const
{
- return FALSE;
+ return false;
}
protected:
CPDF_Object(FX_DWORD type) : m_Type(type), m_ObjNum(0), m_GenNum(0) { }
@@ -108,27 +108,27 @@ protected:
friend class CPDF_SyntaxParser;
private:
CPDF_Object(const CPDF_Object& src) {}
- CPDF_Object* CloneInternal(FX_BOOL bDirect, CFX_MapPtrToPtr* visited) const;
+ CPDF_Object* CloneInternal(bool bDirect, CFX_MapPtrToPtr* visited) const;
};
class CPDF_Boolean : public CPDF_Object
{
public:
- static CPDF_Boolean* Create(FX_BOOL value)
+ static CPDF_Boolean* Create(bool value)
{
return new CPDF_Boolean(value);
}
CPDF_Boolean() : CPDF_Object(PDFOBJ_BOOLEAN), m_bValue(false) { }
- CPDF_Boolean(FX_BOOL value) : CPDF_Object(PDFOBJ_BOOLEAN), m_bValue(value) { }
+ CPDF_Boolean(bool value) : CPDF_Object(PDFOBJ_BOOLEAN), m_bValue(value) { }
- FX_BOOL Identical(CPDF_Boolean* pOther) const
+ bool Identical(CPDF_Boolean* pOther) const
{
return m_bValue == pOther->m_bValue;
}
protected:
- FX_BOOL m_bValue;
+ bool m_bValue;
friend class CPDF_Object;
};
class CPDF_Number : public CPDF_Object
@@ -150,14 +150,14 @@ public:
return new CPDF_Number(str);
}
- static CPDF_Number* Create(FX_BOOL bInteger, void* pData)
+ static CPDF_Number* Create(bool bInteger, void* pData)
{
return new CPDF_Number(bInteger, pData);
}
CPDF_Number() : CPDF_Object(PDFOBJ_NUMBER), m_bInteger(false), m_Integer(0) { }
- CPDF_Number(FX_BOOL bInteger, void* pData);
+ CPDF_Number(bool bInteger, void* pData);
CPDF_Number(int value);
@@ -165,13 +165,13 @@ public:
CPDF_Number(const CFX_ByteStringC& str);
- FX_BOOL Identical(CPDF_Number* pOther) const;
+ bool Identical(CPDF_Number* pOther) const;
CFX_ByteString GetString() const;
void SetString(const CFX_ByteStringC& str);
- FX_BOOL IsInteger() const
+ bool IsInteger() const
{
return m_bInteger;
}
@@ -199,7 +199,7 @@ public:
}
protected:
- FX_BOOL m_bInteger;
+ bool m_bInteger;
union {
@@ -213,7 +213,7 @@ class CPDF_String : public CPDF_Object
{
public:
- static CPDF_String* Create(const CFX_ByteString& str, FX_BOOL bHex = FALSE)
+ static CPDF_String* Create(const CFX_ByteString& str, bool bHex = false)
{
return new CPDF_String(str, bHex);
}
@@ -223,9 +223,9 @@ public:
return new CPDF_String(str);
}
- CPDF_String() : CPDF_Object(PDFOBJ_STRING), m_bHex(FALSE) { }
+ CPDF_String() : CPDF_Object(PDFOBJ_STRING), m_bHex(false) { }
- CPDF_String(const CFX_ByteString& str, FX_BOOL bHex = FALSE)
+ CPDF_String(const CFX_ByteString& str, bool bHex = false)
: CPDF_Object(PDFOBJ_STRING), m_String(str), m_bHex(bHex) {
}
@@ -236,12 +236,12 @@ public:
return m_String;
}
- FX_BOOL Identical(CPDF_String* pOther) const
+ bool Identical(CPDF_String* pOther) const
{
return m_String == pOther->m_String;
}
- FX_BOOL IsHex() const
+ bool IsHex() const
{
return m_bHex;
}
@@ -249,7 +249,7 @@ protected:
CFX_ByteString m_String;
- FX_BOOL m_bHex;
+ bool m_bHex;
friend class CPDF_Object;
};
class CPDF_Name : public CPDF_Object
@@ -280,7 +280,7 @@ public:
return m_Name;
}
- FX_BOOL Identical(CPDF_Name* pOther) const
+ bool Identical(CPDF_Name* pOther) const
{
return m_Name == pOther->m_Name;
}
@@ -378,7 +378,7 @@ public:
AddNumber(value);
}
- FX_BOOL Identical(CPDF_Array* pOther) const;
+ bool Identical(CPDF_Array* pOther) const;
protected:
~CPDF_Array();
@@ -419,7 +419,7 @@ public:
int GetInteger(const CFX_ByteStringC& key, int default_int) const;
- FX_BOOL GetBoolean(const CFX_ByteStringC& key, FX_BOOL bDefault = FALSE) const;
+ bool GetBoolean(const CFX_ByteStringC& key, bool bDefault = false) const;
FX_FLOAT GetNumber(const CFX_ByteStringC& key) const;
@@ -439,7 +439,7 @@ public:
}
- FX_BOOL KeyExist(const CFX_ByteStringC& key) const;
+ bool KeyExist(const CFX_ByteStringC& key) const;
FX_POSITION GetStartPos() const;
@@ -478,7 +478,7 @@ public:
void SetAtMatrix(const CFX_ByteStringC& key, const CFX_AffineMatrix& matrix);
- void SetAtBoolean(const CFX_ByteStringC& key, FX_BOOL bValue);
+ void SetAtBoolean(const CFX_ByteStringC& key, bool bValue);
@@ -487,7 +487,7 @@ public:
void ReplaceKey(const CFX_ByteStringC& oldkey, const CFX_ByteStringC& newkey);
- FX_BOOL Identical(CPDF_Dictionary* pDict) const;
+ bool Identical(CPDF_Dictionary* pDict) const;
int GetCount() const
{
@@ -519,15 +519,15 @@ public:
return m_pDict;
}
- void SetData(const uint8_t* pData, FX_DWORD size, FX_BOOL bCompressed, FX_BOOL bKeepBuf);
+ void SetData(const uint8_t* pData, FX_DWORD size, bool bCompressed, bool bKeepBuf);
void InitStream(uint8_t* pData, FX_DWORD size, CPDF_Dictionary* pDict);
void InitStream(IFX_FileRead *pFile, CPDF_Dictionary* pDict);
- FX_BOOL Identical(CPDF_Stream* pOther) const;
+ bool Identical(CPDF_Stream* pOther) const;
- CPDF_StreamFilter* GetStreamFilter(FX_BOOL bRaw = FALSE) const;
+ CPDF_StreamFilter* GetStreamFilter(bool bRaw = false) const;
@@ -536,15 +536,15 @@ public:
return m_dwSize;
}
- FX_BOOL ReadRawData(FX_FILESIZE start_pos, uint8_t* pBuf, FX_DWORD buf_size) const;
+ bool ReadRawData(FX_FILESIZE start_pos, uint8_t* pBuf, FX_DWORD buf_size) const;
- FX_BOOL IsMemoryBased() const
+ bool IsMemoryBased() const
{
return m_GenNum == (FX_DWORD) - 1;
}
- CPDF_Stream* Clone(FX_BOOL bDirect, FPDF_LPFCloneStreamCallback lpfCallback, void* pUserData) const;
+ CPDF_Stream* Clone(bool bDirect, FPDF_LPFCloneStreamCallback lpfCallback, void* pUserData) const;
protected:
~CPDF_Stream();
@@ -579,8 +579,8 @@ public:
~CPDF_StreamAcc();
- void LoadAllData(const CPDF_Stream* pStream, FX_BOOL bRawAccess = FALSE,
- FX_DWORD estimated_size = 0, FX_BOOL bImageAcc = FALSE);
+ void LoadAllData(const CPDF_Stream* pStream, bool bRawAccess = false,
+ FX_DWORD estimated_size = 0, bool bImageAcc = false);
const CPDF_Stream* GetStream() const
{
@@ -613,7 +613,7 @@ protected:
FX_DWORD m_dwSize;
- FX_BOOL m_bNewBuf;
+ bool m_bNewBuf;
CFX_ByteString m_ImageDecoder;
@@ -691,7 +691,7 @@ public:
void SetRef(CPDF_IndirectObjects* pDoc, FX_DWORD objnum);
- FX_BOOL Identical(CPDF_Reference* pOther) const
+ bool Identical(CPDF_Reference* pOther) const
{
return m_RefObjNum == pOther->m_RefObjNum;
}
« no previous file with comments | « core/include/fpdfapi/fpdf_module.h ('k') | core/include/fpdfapi/fpdf_page.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698