X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fcommon%2Fcompressor.cpp;h=2b91bebe78a9584da8f6fb0c8df0462889f9fa9a;hp=fd4fb3c90e046561c8925beae5cef60b78a47392;hb=c194ed5fb3d15e14b9364f9796d3521910dc72fe;hpb=1cb02004ee5973b89368bd84f234d4652794690d diff --git a/src/common/compressor.cpp b/src/common/compressor.cpp index fd4fb3c9..2b91bebe 100644 --- a/src/common/compressor.cpp +++ b/src/common/compressor.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2015 by the Quassel Project * + * Copyright (C) 2005-2018 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * @@ -23,13 +23,6 @@ #include #include -#ifdef HAVE_ZLIB -# include -#else -# define MINIZ_HEADER_FILE_ONLY -# include "../../3rdparty/miniz/miniz.c" -#endif - const int maxBufferSize = 64 * 1024 * 1024; // protect us from zip bombs const int ioBufferSize = 64 * 1024; // chunk size for inflate/deflate; should not be too large as we preallocate that space! @@ -37,8 +30,8 @@ Compressor::Compressor(QTcpSocket *socket, Compressor::CompressionLevel level, Q : QObject(parent), _socket(socket), _level(level), - _inflater(0), - _deflater(0) + _inflater(nullptr), + _deflater(nullptr) { connect(socket, SIGNAL(readyRead()), SLOT(readData())); @@ -97,7 +90,7 @@ bool Compressor::initStreams() _deflater = new z_stream; memset(_deflater, 0, sizeof(z_stream)); if (Z_OK != deflateInit(_deflater, zlevel)) { - qWarning() << "Could not intialize the deflate stream!"; + qWarning() << "Could not initialize the deflate stream!"; return false; }