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

Unified Diff: core/fxcrt/fx_extension.cpp

Issue 2450183003: Fix some FX_BOOL / int noise in fxcrt. (Closed)
Patch Set: 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
Index: core/fxcrt/fx_extension.cpp
diff --git a/core/fxcrt/fx_extension.cpp b/core/fxcrt/fx_extension.cpp
index 5ac22bd44eedeedb3a40dd062416845a72f72dd1..0aaa6cdc53be16c425cbecf5dd487fb7a637dbe5 100644
--- a/core/fxcrt/fx_extension.cpp
+++ b/core/fxcrt/fx_extension.cpp
@@ -308,7 +308,7 @@ FX_FILESIZE CFX_CRTFileStream::GetPosition() {
FX_BOOL CFX_CRTFileStream::ReadBlock(void* buffer,
FX_FILESIZE offset,
size_t size) {
- return (FX_BOOL)m_pFile->ReadPos(buffer, size, offset);
+ return m_pFile->ReadPos(buffer, size, offset) > 0;
}
size_t CFX_CRTFileStream::ReadBlock(void* buffer, size_t size) {
@@ -318,7 +318,7 @@ size_t CFX_CRTFileStream::ReadBlock(void* buffer, size_t size) {
FX_BOOL CFX_CRTFileStream::WriteBlock(const void* buffer,
FX_FILESIZE offset,
size_t size) {
- return (FX_BOOL)m_pFile->WritePos(buffer, size, offset);
+ return m_pFile->WritePos(buffer, size, offset) == size;
npm 2016/10/26 18:26:04 Is WritePos guaranteed to return either 0 or size?
Tom Sepez 2016/10/26 20:47:03 reverted to old behaviour via !!
}
FX_BOOL CFX_CRTFileStream::Flush() {

Powered by Google App Engine
This is Rietveld 408576698