summaryrefslogtreecommitdiff
path: root/xfa/fgas/crt/fgas_stream.cpp
diff options
context:
space:
mode:
authortsepez <tsepez@chromium.org>2016-10-26 15:33:58 -0700
committerCommit bot <commit-bot@chromium.org>2016-10-26 15:33:58 -0700
commitf39074c0ae47a84c496782f8b75bcce1e1cfdf59 (patch)
tree077b7f12bff3c4aa4d53c6b74fa32e613cc73a27 /xfa/fgas/crt/fgas_stream.cpp
parente5cb0b191aed020da99757c117dae014ea65c6ba (diff)
downloadpdfium-f39074c0ae47a84c496782f8b75bcce1e1cfdf59.tar.xz
Fix some FX_BOOL / int noise in fxcrt.chromium/2902
Review-Url: https://codereview.chromium.org/2450183003
Diffstat (limited to 'xfa/fgas/crt/fgas_stream.cpp')
-rw-r--r--xfa/fgas/crt/fgas_stream.cpp17
1 files changed, 9 insertions, 8 deletions
diff --git a/xfa/fgas/crt/fgas_stream.cpp b/xfa/fgas/crt/fgas_stream.cpp
index f0a2a88100..6da4e9ed8c 100644
--- a/xfa/fgas/crt/fgas_stream.cpp
+++ b/xfa/fgas/crt/fgas_stream.cpp
@@ -291,16 +291,16 @@ class CFX_TextStream : public IFX_Stream {
class CFGAS_FileRead : public IFX_SeekableReadStream {
public:
- CFGAS_FileRead(IFX_Stream* pStream, FX_BOOL bReleaseStream);
+ CFGAS_FileRead(IFX_Stream* pStream, bool bReleaseStream);
~CFGAS_FileRead() override;
// IFX_SeekableReadStream
void Release() override;
FX_FILESIZE GetSize() override;
- FX_BOOL ReadBlock(void* buffer, FX_FILESIZE offset, size_t size) override;
+ bool ReadBlock(void* buffer, FX_FILESIZE offset, size_t size) override;
protected:
- FX_BOOL m_bReleaseStream;
+ bool m_bReleaseStream;
IFX_Stream* m_pStream;
};
@@ -1469,12 +1469,14 @@ IFX_Stream* CFX_Stream::CreateSharedStream(uint32_t dwAccess,
}
return pShared;
}
+
IFX_SeekableReadStream* FX_CreateFileRead(IFX_Stream* pBaseStream,
- FX_BOOL bReleaseStream) {
+ bool bReleaseStream) {
ASSERT(pBaseStream);
return new CFGAS_FileRead(pBaseStream, bReleaseStream);
}
-CFGAS_FileRead::CFGAS_FileRead(IFX_Stream* pStream, FX_BOOL bReleaseStream)
+
+CFGAS_FileRead::CFGAS_FileRead(IFX_Stream* pStream, bool bReleaseStream)
: m_bReleaseStream(bReleaseStream), m_pStream(pStream) {
ASSERT(m_pStream);
}
@@ -1486,9 +1488,8 @@ CFGAS_FileRead::~CFGAS_FileRead() {
FX_FILESIZE CFGAS_FileRead::GetSize() {
return (FX_FILESIZE)m_pStream->GetLength();
}
-FX_BOOL CFGAS_FileRead::ReadBlock(void* buffer,
- FX_FILESIZE offset,
- size_t size) {
+
+bool CFGAS_FileRead::ReadBlock(void* buffer, FX_FILESIZE offset, size_t size) {
m_pStream->Seek(FX_STREAMSEEK_Begin, (int32_t)offset);
int32_t iLen = m_pStream->ReadData((uint8_t*)buffer, (int32_t)size);
return iLen == (int32_t)size;