mirror of https://github.com/aria2/aria2
GZipFile: Move buf_, buflen_ to initializer list
parent
43cb2d880a
commit
588ee2f1cc
|
@ -44,7 +44,8 @@
|
||||||
namespace aria2 {
|
namespace aria2 {
|
||||||
|
|
||||||
GZipFile::GZipFile(const char* filename, const char* mode)
|
GZipFile::GZipFile(const char* filename, const char* mode)
|
||||||
: BufferedFile(0), fp_(0), open_(false)
|
: BufferedFile(0), fp_(0), open_(false),
|
||||||
|
buflen_(1024), buf_(reinterpret_cast<char*>(malloc(buflen_)))
|
||||||
{
|
{
|
||||||
FILE* fp =
|
FILE* fp =
|
||||||
#ifdef __MINGW32__
|
#ifdef __MINGW32__
|
||||||
|
@ -72,8 +73,6 @@ GZipFile::GZipFile(const char* filename, const char* mode)
|
||||||
}
|
}
|
||||||
fclose(fp);
|
fclose(fp);
|
||||||
}
|
}
|
||||||
buflen_ = 1024;
|
|
||||||
buf_ = reinterpret_cast<char*>(malloc(buflen_));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
GZipFile::~GZipFile()
|
GZipFile::~GZipFile()
|
||||||
|
|
|
@ -60,8 +60,8 @@ private:
|
||||||
gzFile fp_;
|
gzFile fp_;
|
||||||
bool open_;
|
bool open_;
|
||||||
|
|
||||||
char* buf_;
|
|
||||||
size_t buflen_;
|
size_t buflen_;
|
||||||
|
char* buf_;
|
||||||
protected:
|
protected:
|
||||||
virtual bool isError() const;
|
virtual bool isError() const;
|
||||||
virtual bool isEOF() const { return gzeof(fp_); }
|
virtual bool isEOF() const { return gzeof(fp_); }
|
||||||
|
|
Loading…
Reference in New Issue