Skip to content

Commit

Permalink
Merge pull request #1565 from berryzplus/feature/fix_size_arg_type
Browse files Browse the repository at this point in the history
COutputStream::Writeの第2引数をsize_tにする
  • Loading branch information
berryzplus authored Mar 4, 2021
2 parents 8403d1e + a800327 commit e8b9117
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions sakura_core/io/CStream.h
Original file line number Diff line number Diff line change
Expand Up @@ -93,11 +93,11 @@ class COutputStream : public CStream{
}

//! データを無変換で書き込む。戻り値は書き込んだバイト数。
int Write(const void* pBuffer, int nSizeInBytes)
int Write(const void* pBuffer, size_t nSizeInBytes)
{
int nRet = fwrite(pBuffer,1,nSizeInBytes,GetFp());
size_t nRet = ::fwrite(pBuffer, 1, nSizeInBytes, GetFp());
if(nRet!=nSizeInBytes && IsExceptionMode())throw CError_FileWrite();
return nRet;
return static_cast<int>(nRet);
}
};
#endif /* SAKURA_CSTREAM_0083EDD7_A671_4315_801D_41FED1A2E3DA_H_ */

0 comments on commit e8b9117

Please sign in to comment.