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

Unified Diff: xfa/fgas/crt/fgas_stream.cpp

Issue 2450183003: Fix some FX_BOOL / int noise in fxcrt. (Closed)
Patch Set: moar Created 4 years, 2 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 | « xfa/fgas/crt/fgas_stream.h ('k') | xfa/fxfa/app/xfa_ffapp.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: xfa/fgas/crt/fgas_stream.cpp
diff --git a/xfa/fgas/crt/fgas_stream.cpp b/xfa/fgas/crt/fgas_stream.cpp
index f0a2a88100c9fbe16350d69bf74cd18436e1b588..6da4e9ed8cd05d9a6f266772cb498110473c2da9 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;
« no previous file with comments | « xfa/fgas/crt/fgas_stream.h ('k') | xfa/fxfa/app/xfa_ffapp.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698