Kaydet (Commit) b755094c authored tarafından Stephan Bergmann's avatar Stephan Bergmann

No need for an abstaract HIODev::close

...that was only called from dtors anyway, where its virtual-ness doesn't
actually help (and would trigger loplugin:fragiledestructor if that were
enabled)

Change-Id: I477a22f2cadd1124b7106c5338e525629968a284
üst 96e9ffa6
...@@ -116,7 +116,11 @@ HStreamIODev::HStreamIODev(HStream * stream):_stream(stream) ...@@ -116,7 +116,11 @@ HStreamIODev::HStreamIODev(HStream * stream):_stream(stream)
HStreamIODev::~HStreamIODev() HStreamIODev::~HStreamIODev()
{ {
close(); /* 플러시한 후 닫는다. */
this->flush();
if (_gzfp)
gz_close(_gzfp);
_gzfp = nullptr;
} }
...@@ -142,16 +146,6 @@ void HStreamIODev::flush() ...@@ -142,16 +146,6 @@ void HStreamIODev::flush()
} }
void HStreamIODev::close()
{
/* 플러시한 후 닫는다. */
this->flush();
if (_gzfp)
gz_close(_gzfp);
_gzfp = nullptr;
}
int HStreamIODev::state() const int HStreamIODev::state() const
{ {
return 0; return 0;
...@@ -272,7 +266,6 @@ HMemIODev::HMemIODev(char *s, int len) ...@@ -272,7 +266,6 @@ HMemIODev::HMemIODev(char *s, int len)
HMemIODev::~HMemIODev() HMemIODev::~HMemIODev()
{ {
close();
} }
...@@ -295,11 +288,6 @@ void HMemIODev::flush() ...@@ -295,11 +288,6 @@ void HMemIODev::flush()
} }
void HMemIODev::close()
{
}
int HMemIODev::state() const int HMemIODev::state() const
{ {
if (pos <= length) if (pos <= length)
......
...@@ -46,7 +46,6 @@ class DLLEXPORT HIODev ...@@ -46,7 +46,6 @@ class DLLEXPORT HIODev
virtual ~HIODev(); virtual ~HIODev();
virtual bool open() = 0; virtual bool open() = 0;
virtual void close() = 0;
virtual void flush() = 0; virtual void flush() = 0;
virtual int state() const = 0; virtual int state() const = 0;
/* gzip routine wrapper */ /* gzip routine wrapper */
...@@ -73,7 +72,7 @@ struct gz_stream; ...@@ -73,7 +72,7 @@ struct gz_stream;
* This controls the HStream given by constructor * This controls the HStream given by constructor
* @short Stream IO device * @short Stream IO device
*/ */
class HStreamIODev : public HIODev class HStreamIODev final: public HIODev
{ {
private: private:
/* zlib으로 압축을 풀기 위한 자료 구조 */ /* zlib으로 압축을 풀기 위한 자료 구조 */
...@@ -86,10 +85,6 @@ class HStreamIODev : public HIODev ...@@ -86,10 +85,6 @@ class HStreamIODev : public HIODev
* Check whether the stream is available * Check whether the stream is available
*/ */
virtual bool open() override; virtual bool open() override;
/**
* Free stream object
*/
virtual void close() override;
/** /**
* If the stream is gzipped, flush the stream. * If the stream is gzipped, flush the stream.
*/ */
...@@ -139,7 +134,7 @@ class HStreamIODev : public HIODev ...@@ -139,7 +134,7 @@ class HStreamIODev : public HIODev
* The HMemIODev class controls the Input/Output device. * The HMemIODev class controls the Input/Output device.
* @short Memory IO device * @short Memory IO device
*/ */
class HMemIODev : public HIODev class HMemIODev final: public HIODev
{ {
uchar *ptr; uchar *ptr;
int pos, length; int pos, length;
...@@ -148,7 +143,6 @@ class HMemIODev : public HIODev ...@@ -148,7 +143,6 @@ class HMemIODev : public HIODev
virtual ~HMemIODev() override; virtual ~HMemIODev() override;
virtual bool open() override; virtual bool open() override;
virtual void close() override;
virtual void flush() override; virtual void flush() override;
virtual int state() const override; virtual int state() const override;
/* gzip routine wrapper */ /* gzip routine wrapper */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment