diff options
| author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2013-03-03 22:51:27 +0900 |
|---|---|---|
| committer | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2013-03-03 22:55:44 +0900 |
| commit | 588ee2f1cc11061332c508a848f2568ea2585ddb (patch) | |
| tree | c23819f2b253f46a9ead7a411c66c6ab8cbb34c2 /src/GZipFile.cc | |
| parent | 43cb2d880aea545ccd10c0c4366013f16437828c (diff) | |
GZipFile: Move buf_, buflen_ to initializer list
Diffstat (limited to 'src/GZipFile.cc')
| -rw-r--r-- | src/GZipFile.cc | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/GZipFile.cc b/src/GZipFile.cc index d386d60b..947c5318 100644 --- a/src/GZipFile.cc +++ b/src/GZipFile.cc @@ -44,7 +44,8 @@ namespace aria2 { 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 = #ifdef __MINGW32__ @@ -72,8 +73,6 @@ GZipFile::GZipFile(const char* filename, const char* mode) } fclose(fp); } - buflen_ = 1024; - buf_ = reinterpret_cast<char*>(malloc(buflen_)); } GZipFile::~GZipFile() |
