From 0b527f1985b5798b3dee8a619b029f5f6af7609e Mon Sep 17 00:00:00 2001 From: mrexodia Date: Tue, 29 Dec 2015 00:03:28 +0100 Subject: [PATCH] fixes in Static.File (documentation) --- GleeBug/Static.File.cpp | 2 +- GleeBug/Static.File.h | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/GleeBug/Static.File.cpp b/GleeBug/Static.File.cpp index 71df809..b39bc97 100644 --- a/GleeBug/Static.File.cpp +++ b/GleeBug/Static.File.cpp @@ -58,7 +58,7 @@ namespace GleeBug return result; } - bool File::Write(uint32 offset, const void* data, uint32 size, uint32* bytesWritten) const + bool File::Write(uint32 offset, const void* data, uint32 size, uint32* bytesWritten) { if (!IsOpen() || SetFilePointer(_hFile, offset, nullptr, FILE_BEGIN) == INVALID_SET_FILE_POINTER) { diff --git a/GleeBug/Static.File.h b/GleeBug/Static.File.h index 2039cc3..493c3ac 100644 --- a/GleeBug/Static.File.h +++ b/GleeBug/Static.File.h @@ -65,8 +65,8 @@ namespace GleeBug \param offset The offset to start reading from. \param [out] data Destination buffer. \param size The size to read. - \param [out] bytesRead (Optional) If set, returns the number of bytes read. - \return true if the read was successful, false otherwise. + \param [out] bytesRead (Optional) If set, returns the number of bytes read (even on failure). + \return true if the read was fully successful, false otherwise. */ virtual bool Read(uint32 offset, void* data, uint32 size, uint32* bytesRead = nullptr) const; @@ -75,10 +75,10 @@ namespace GleeBug \param offset The offset to start writing to. Everything after this offset will be truncated! \param data The data to write. \param size The size to write. - \param [out] bytesWritten (Optional) If set, returns the number of bytes written. - \return true if the write was successful, false otherwise. + \param [out] bytesWritten (Optional) If set, returns the number of bytes written (even on failure) + \return true if the write was fully successful, false otherwise. */ - virtual bool Write(uint32 offset, const void* data, uint32 size, uint32* bytesWritten = nullptr) const; + virtual bool Write(uint32 offset, const void* data, uint32 size, uint32* bytesWritten = nullptr); private: bool internalOpen(DWORD creation);