projects
/
quassel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
modernize: Use auto where the type is clear from context
[quassel.git]
/
src
/
common
/
compressor.cpp
diff --git
a/src/common/compressor.cpp
b/src/common/compressor.cpp
index
fd4fb3c
..
2b91beb
100644
(file)
--- a/
src/common/compressor.cpp
+++ b/
src/common/compressor.cpp
@@
-1,5
+1,5
@@
/***************************************************************************
/***************************************************************************
- * Copyright (C) 2005-201
5
by the Quassel Project *
+ * Copyright (C) 2005-201
8
by the Quassel Project *
* devel@quassel-irc.org *
* *
* This program is free software; you can redistribute it and/or modify *
* devel@quassel-irc.org *
* *
* This program is free software; you can redistribute it and/or modify *
@@
-23,13
+23,6
@@
#include <QTcpSocket>
#include <QTimer>
#include <QTcpSocket>
#include <QTimer>
-#ifdef HAVE_ZLIB
-# include <zlib.h>
-#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!
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),
: QObject(parent),
_socket(socket),
_level(level),
- _inflater(
0
),
- _deflater(
0
)
+ _inflater(
nullptr
),
+ _deflater(
nullptr
)
{
connect(socket, SIGNAL(readyRead()), SLOT(readData()));
{
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)) {
_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 in
i
tialize the deflate stream!";
return false;
}
return false;
}