fs/io/GunzipReader: use C++11 initializer
This commit is contained in:
parent
bde50b1be8
commit
288b98ccbf
@ -31,13 +31,13 @@ class GunzipReader;
|
||||
* #GunzipReader.
|
||||
*/
|
||||
class AutoGunzipReader final : public Reader {
|
||||
Reader *next;
|
||||
Reader *next = nullptr;
|
||||
PeekReader peek;
|
||||
GunzipReader *gunzip;
|
||||
GunzipReader *gunzip = nullptr;
|
||||
|
||||
public:
|
||||
AutoGunzipReader(Reader &_next)
|
||||
:next(nullptr), peek(_next), gunzip(nullptr) {}
|
||||
:peek(_next) {}
|
||||
~AutoGunzipReader();
|
||||
|
||||
/* virtual methods from class Reader */
|
||||
|
@ -35,14 +35,13 @@ class BufferedReader {
|
||||
|
||||
DynamicFifoBuffer<char> buffer;
|
||||
|
||||
bool eof;
|
||||
bool eof = false;
|
||||
|
||||
unsigned line_number;
|
||||
unsigned line_number = 0;
|
||||
|
||||
public:
|
||||
BufferedReader(Reader &_reader)
|
||||
:reader(_reader), buffer(4096), eof(false),
|
||||
line_number(0) {}
|
||||
:reader(_reader), buffer(4096) {}
|
||||
|
||||
/**
|
||||
* Reset the internal state. Should be called after rewinding
|
||||
|
@ -22,7 +22,7 @@
|
||||
#include "lib/zlib/Error.hxx"
|
||||
|
||||
GunzipReader::GunzipReader(Reader &_next)
|
||||
:next(_next), eof(false)
|
||||
:next(_next)
|
||||
{
|
||||
z.next_in = nullptr;
|
||||
z.avail_in = 0;
|
||||
|
@ -33,7 +33,7 @@
|
||||
class GunzipReader final : public Reader {
|
||||
Reader &next;
|
||||
|
||||
bool eof;
|
||||
bool eof = false;
|
||||
|
||||
z_stream z;
|
||||
|
||||
|
@ -34,13 +34,13 @@
|
||||
class PeekReader final : public Reader {
|
||||
Reader &next;
|
||||
|
||||
size_t buffer_size, buffer_position;
|
||||
size_t buffer_size = 0, buffer_position = 0;
|
||||
|
||||
uint8_t buffer[64];
|
||||
|
||||
public:
|
||||
PeekReader(Reader &_next)
|
||||
:next(_next), buffer_size(0), buffer_position(0) {}
|
||||
:next(_next) {}
|
||||
|
||||
const void *Peek(size_t size);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user