diff --git a/mert/FileStream.h b/mert/FileStream.h index cdf786632..78b6ccb88 100644 --- a/mert/FileStream.h +++ b/mert/FileStream.h @@ -13,7 +13,8 @@ protected: public: explicit inputfilestream(const std::string &filePath); - ~inputfilestream(); + virtual ~inputfilestream(); + bool good() const { return is_good; } void close(); }; @@ -26,7 +27,8 @@ protected: public: explicit outputfilestream(const std::string &filePath); - ~outputfilestream(); + virtual ~outputfilestream(); + bool good() const { return is_good; } void close(); }; diff --git a/mert/gzfilebuf.h b/mert/gzfilebuf.h index 3a5ef90dd..b0f9637b3 100644 --- a/mert/gzfilebuf.h +++ b/mert/gzfilebuf.h @@ -14,9 +14,11 @@ public: _buff+sizeof(int), // read position _buff+sizeof(int)); // end position } - ~gzfilebuf() { + + virtual ~gzfilebuf() { gzclose(_gzf); } + protected: virtual int_type overflow (int_type c) { throw;