Add const to almost all remaining vars and arguments that qualify

This commit is contained in:
thalieht 2019-02-21 23:31:43 +02:00
parent bb041c0eca
commit 70f1537d9f
35 changed files with 261 additions and 261 deletions

View file

@ -79,7 +79,7 @@ Server::Server(IRequestHandler *requestHandler, QObject *parent)
dropConnectionTimer->start(CONNECTIONS_SCAN_INTERVAL * 1000);
}
void Server::incomingConnection(qintptr socketDescriptor)
void Server::incomingConnection(const qintptr socketDescriptor)
{
if (m_connections.size() >= CONNECTIONS_LIMIT) return;
@ -110,7 +110,7 @@ void Server::dropTimedOutConnection()
{
QMutableListIterator<Connection *> i(m_connections);
while (i.hasNext()) {
auto connection = i.next();
const auto *connection = i.next();
if (connection->isClosed() || connection->hasExpired(KEEP_ALIVE_DURATION)) {
delete connection;
i.remove();