From 47c8710ac21d852af5f090e1c426e3f6ce30e1af Mon Sep 17 00:00:00 2001 From: Stefan Weil Date: Thu, 18 Jul 2019 10:48:27 +0200 Subject: [PATCH] Remove unused filesize_ from class InputBuffer This also simplifies the constructors. Signed-off-by: Stefan Weil --- src/ccutil/fileio.cpp | 6 ------ src/ccutil/fileio.h | 1 - 2 files changed, 7 deletions(-) diff --git a/src/ccutil/fileio.cpp b/src/ccutil/fileio.cpp index a9c8cb64c..b787c158b 100644 --- a/src/ccutil/fileio.cpp +++ b/src/ccutil/fileio.cpp @@ -133,16 +133,10 @@ bool File::DeleteMatchingFiles(const char* pattern) { /////////////////////////////////////////////////////////////////////////////// InputBuffer::InputBuffer(FILE* stream) : stream_(stream) { - fseek(stream_, 0, SEEK_END); - filesize_ = ftell(stream_); - fseek(stream_, 0, SEEK_SET); } InputBuffer::InputBuffer(FILE* stream, size_t) : stream_(stream) { - fseek(stream_, 0, SEEK_END); - filesize_ = ftell(stream_); - fseek(stream_, 0, SEEK_SET); } InputBuffer::~InputBuffer() { diff --git a/src/ccutil/fileio.h b/src/ccutil/fileio.h index e72439a95..43435ce4d 100644 --- a/src/ccutil/fileio.h +++ b/src/ccutil/fileio.h @@ -71,7 +71,6 @@ class InputBuffer { private: FILE* stream_; - int filesize_; }; // A class to manipulate Files for writing.