serialize.h: CAutoFile's read and write may take size_t nSize

This commit is contained in:
Jeff Garzik 2012-04-15 16:59:09 -04:00 committed by Jeff Garzik
parent 3a78f82a78
commit c3fad8350b

View File

@ -1190,7 +1190,7 @@ public:
void ReadVersion() { *this >> nVersion; } void ReadVersion() { *this >> nVersion; }
void WriteVersion() { *this << nVersion; } void WriteVersion() { *this << nVersion; }
CAutoFile& read(char* pch, int nSize) CAutoFile& read(char* pch, size_t nSize)
{ {
if (!file) if (!file)
throw std::ios_base::failure("CAutoFile::read : file handle is NULL"); throw std::ios_base::failure("CAutoFile::read : file handle is NULL");
@ -1199,7 +1199,7 @@ public:
return (*this); return (*this);
} }
CAutoFile& write(const char* pch, int nSize) CAutoFile& write(const char* pch, size_t nSize)
{ {
if (!file) if (!file)
throw std::ios_base::failure("CAutoFile::write : file handle is NULL"); throw std::ios_base::failure("CAutoFile::write : file handle is NULL");