X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fio%2Fzlibcompressed.cpp;h=6c06cf3fd952870dc243817a6d3f786ac8434f92;hb=5763dd6e8089c97699cbcbd221afb7fe1841bcdd;hp=f477bdc46f180e3446f5ee898470c9519ad0fdff;hpb=c8bf2d6c15893ccc9dbc4e04611b7229029f4808;p=libs%2Fcore.git diff --git a/source/io/zlibcompressed.cpp b/source/io/zlibcompressed.cpp index f477bdc..6c06cf3 100644 --- a/source/io/zlibcompressed.cpp +++ b/source/io/zlibcompressed.cpp @@ -8,13 +8,13 @@ using namespace std; namespace Msp { namespace IO { -zlib_error::zlib_error(const std::string &w, int c): +zlib_error::zlib_error(const string &w, int c): #ifdef WITH_ZLIB runtime_error(w+": "+zError(c)), #else runtime_error(w), #endif - code_(c) + m_code(c) { } @@ -37,16 +37,6 @@ ZlibCompressed::Private::Private() } -ZlibCompressed::ZlibCompressed(Base &b, unsigned level): - below(b) -{ - mode = below.get_mode()&M_RDWR; - if(mode!=M_READ && mode!=M_WRITE) - throw invalid_access(mode); - - init(level); -} - ZlibCompressed::ZlibCompressed(Base &b, Mode m, unsigned level): below(b) { @@ -54,16 +44,7 @@ ZlibCompressed::ZlibCompressed(Base &b, Mode m, unsigned level): if(mode!=M_READ && mode!=M_WRITE) throw invalid_access(m); - init(level); -} - -void ZlibCompressed::init(unsigned level) -{ #ifdef WITH_ZLIB - buffer_size = 1024; - in_buffer = 0; - out_buffer = 0; - stream_end = false; priv = new Private; if(mode==M_WRITE)