lib/zlib/GunzipReader: use std::size_t
This commit is contained in:
parent
dda0dfc140
commit
aea4d3c4b0
@ -28,7 +28,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "GunzipReader.hxx"
|
#include "GunzipReader.hxx"
|
||||||
#include "lib/zlib/Error.hxx"
|
#include "Error.hxx"
|
||||||
|
|
||||||
GunzipReader::GunzipReader(Reader &_next)
|
GunzipReader::GunzipReader(Reader &_next)
|
||||||
:next(_next)
|
:next(_next)
|
||||||
@ -50,7 +50,7 @@ GunzipReader::FillBuffer()
|
|||||||
auto w = buffer.Write();
|
auto w = buffer.Write();
|
||||||
assert(!w.empty());
|
assert(!w.empty());
|
||||||
|
|
||||||
size_t nbytes = next.Read(w.data, w.size);
|
std::size_t nbytes = next.Read(w.data, w.size);
|
||||||
if (nbytes == 0)
|
if (nbytes == 0)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
@ -58,8 +58,8 @@ GunzipReader::FillBuffer()
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
size_t
|
std::size_t
|
||||||
GunzipReader::Read(void *data, size_t size)
|
GunzipReader::Read(void *data, std::size_t size)
|
||||||
{
|
{
|
||||||
if (eof)
|
if (eof)
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -60,7 +60,7 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* virtual methods from class Reader */
|
/* virtual methods from class Reader */
|
||||||
size_t Read(void *data, size_t size) override;
|
std::size_t Read(void *data, std::size_t size) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
bool FillBuffer();
|
bool FillBuffer();
|
||||||
|
@ -28,7 +28,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "GzipOutputStream.hxx"
|
#include "GzipOutputStream.hxx"
|
||||||
#include "lib/zlib/Error.hxx"
|
#include "Error.hxx"
|
||||||
|
|
||||||
GzipOutputStream::GzipOutputStream(OutputStream &_next)
|
GzipOutputStream::GzipOutputStream(OutputStream &_next)
|
||||||
:next(_next)
|
:next(_next)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user