X-Git-Url: http://git.tdb.fi/?p=libs%2Fcore.git;a=blobdiff_plain;f=source%2Fio%2Fzlibcompressed.h;h=eb35f6ce1b8c7c7b33e25cf86f39d36f83b8f782;hp=fb12d61a4eff0fdcb07386582b759c302fc361dd;hb=991fabc1956b73a4007859058fb44171000b452e;hpb=99b9121e2158603372c7313400283b622e6754d8 diff --git a/source/io/zlibcompressed.h b/source/io/zlibcompressed.h index fb12d61..eb35f6c 100644 --- a/source/io/zlibcompressed.h +++ b/source/io/zlibcompressed.h @@ -12,13 +12,13 @@ namespace IO { class zlib_error: public std::runtime_error { private: - int code_; + int m_code; public: zlib_error(const std::string &, int); - virtual ~zlib_error() throw() = default; + ~zlib_error() throw() override = default; - int code() const throw() { return code_; } + int code() const throw() { return m_code; } }; /** @@ -35,10 +35,10 @@ private: Base &below; std::size_t buffer_size = 1024; - unsigned char *in_buffer = 0; - unsigned char *out_buffer = 0; + unsigned char *in_buffer = nullptr; + unsigned char *out_buffer = nullptr; bool stream_end = false; - Private *priv = 0; + Private *priv = nullptr; public: /** Creates a zlib de/compression object. The underlying object must be @@ -50,15 +50,15 @@ public: write, and compatible with the underlying object. */ ZlibCompressed(Base &, Mode, unsigned level = 9); - virtual ~ZlibCompressed(); + ~ZlibCompressed() override; - virtual void set_block(bool); - virtual void set_inherit(bool); + void set_block(bool) override; + void set_inherit(bool) override; void flush(); protected: - virtual std::size_t do_write(const char *, std::size_t); + std::size_t do_write(const char *, std::size_t) override; private: /** Compresses data and writes it to the underlying object. Returns true if @@ -68,9 +68,9 @@ private: bool compress_data(int flush_mode); public: - virtual std::size_t do_read(char *, std::size_t); + std::size_t do_read(char *, std::size_t) override; - virtual const Handle &get_handle(Mode); + const Handle &get_handle(Mode) override; }; } // namespace IO