diff options
| author | Tobias Markmann <tm@ayena.de> | 2015-11-04 08:31:06 (GMT) |
|---|---|---|
| committer | Kevin Smith <kevin.smith@isode.com> | 2015-11-09 16:05:25 (GMT) |
| commit | 526bbaf268851f8295a72f4ca8e6a97bcf43e37a (patch) | |
| tree | 5d2b806ad73cfff026d0a084c9a384c900f96329 | |
| parent | 879ca89f1df610f9de30e4396956d62ba5d4bdff (diff) | |
| download | swift-526bbaf268851f8295a72f4ca8e6a97bcf43e37a.zip swift-526bbaf268851f8295a72f4ca8e6a97bcf43e37a.tar.bz2 | |
Change virtual calls in ctors/dtors to be explicit
Test-Information:
Still builds and tests pass on OS X 10.10.5.
Change-Id: Ic616e7b9de443ce34b46de63ac1bb0cca34b08ee
| -rw-r--r-- | Swiften/FileTransfer/DefaultFileTransferTransporter.cpp | 2 | ||||
| -rw-r--r-- | Swiften/Network/BOSHConnection.cpp | 13 | ||||
| -rw-r--r-- | Swiften/Parser/MessageParser.cpp | 8 | ||||
| -rw-r--r-- | Swiften/Session/BOSHSessionStream.cpp | 2 | ||||
| -rw-r--r-- | Swiften/Session/BOSHSessionStream.h | 2 |
5 files changed, 14 insertions, 13 deletions
diff --git a/Swiften/FileTransfer/DefaultFileTransferTransporter.cpp b/Swiften/FileTransfer/DefaultFileTransferTransporter.cpp index 20635f9..1e68bc6 100644 --- a/Swiften/FileTransfer/DefaultFileTransferTransporter.cpp +++ b/Swiften/FileTransfer/DefaultFileTransferTransporter.cpp @@ -66,19 +66,19 @@ DefaultFileTransferTransporter::DefaultFileTransferTransporter( remoteCandidateSelector = new RemoteJingleTransportCandidateSelector( connectionFactory, timerFactory, options); remoteCandidateSelector->onCandidateSelectFinished.connect( boost::bind(&DefaultFileTransferTransporter::handleRemoteCandidateSelectFinished, this, _1, _2)); } DefaultFileTransferTransporter::~DefaultFileTransferTransporter() { - stopGeneratingLocalCandidates(); + DefaultFileTransferTransporter::stopGeneratingLocalCandidates(); remoteCandidateSelector->onCandidateSelectFinished.disconnect( boost::bind(&DefaultFileTransferTransporter::handleRemoteCandidateSelectFinished, this, _1, _2)); delete remoteCandidateSelector; localCandidateGenerator->onLocalTransportCandidatesGenerated.disconnect( boost::bind(&DefaultFileTransferTransporter::handleLocalCandidatesGenerated, this, _1)); delete localCandidateGenerator; } diff --git a/Swiften/Network/BOSHConnection.cpp b/Swiften/Network/BOSHConnection.cpp index a9565c9..298b015 100644 --- a/Swiften/Network/BOSHConnection.cpp +++ b/Swiften/Network/BOSHConnection.cpp @@ -1,32 +1,33 @@ /* * Copyright (c) 2011 Thilo Cestonaro * Licensed under the simplified BSD license. * See Documentation/Licenses/BSD-simplified.txt for more information. */ /* - * Copyright (c) 2011-2014 Isode Limited. + * Copyright (c) 2011-2015 Isode Limited. * All rights reserved. * See the COPYING file for more information. */ #include <Swiften/Network/BOSHConnection.h> +#include <string> + #include <boost/bind.hpp> -#include <boost/thread.hpp> #include <boost/lexical_cast.hpp> -#include <string> +#include <boost/thread.hpp> +#include <Swiften/Base/ByteArray.h> +#include <Swiften/Base/Concat.h> #include <Swiften/Base/Log.h> #include <Swiften/Base/String.h> -#include <Swiften/Base/Concat.h> -#include <Swiften/Base/ByteArray.h> #include <Swiften/Network/HostAddressPort.h> #include <Swiften/Parser/BOSHBodyExtractor.h> namespace Swift { BOSHConnection::BOSHConnection(const URL& boshURL, Connector::ref connector, XMLParserFactory* parserFactory) : boshURL_(boshURL), connector_(connector), parserFactory_(parserFactory), @@ -38,19 +39,19 @@ BOSHConnection::BOSHConnection(const URL& boshURL, Connector::ref connector, XML { } BOSHConnection::~BOSHConnection() { cancelConnector(); if (connection_) { connection_->onDataRead.disconnect(boost::bind(&BOSHConnection::handleDataRead, shared_from_this(), _1)); connection_->onDisconnected.disconnect(boost::bind(&BOSHConnection::handleDisconnected, shared_from_this(), _1)); } - disconnect(); + BOSHConnection::disconnect(); } void BOSHConnection::connect() { connector_->onConnectFinished.connect(boost::bind(&BOSHConnection::handleConnectFinished, shared_from_this(), _1)); connector_->start(); } void BOSHConnection::cancelConnector() { if (connector_) { diff --git a/Swiften/Parser/MessageParser.cpp b/Swiften/Parser/MessageParser.cpp index fd9d57c..5de0038 100644 --- a/Swiften/Parser/MessageParser.cpp +++ b/Swiften/Parser/MessageParser.cpp @@ -1,24 +1,24 @@ /* - * Copyright (c) 2010 Isode Limited. + * Copyright (c) 2010-2015 Isode Limited. * All rights reserved. * See the COPYING file for more information. */ -#include <boost/optional.hpp> - #include <Swiften/Parser/MessageParser.h> +#include <boost/optional.hpp> + namespace Swift { MessageParser::MessageParser(PayloadParserFactoryCollection* factories) : GenericStanzaParser<Message>(factories) { - getStanzaGeneric()->setType(Message::Normal); + GenericStanzaParser<Message>::getStanzaGeneric()->setType(Message::Normal); } void MessageParser::handleStanzaAttributes(const AttributeMap& attributes) { boost::optional<std::string> type = attributes.getAttributeValue("type"); if (type) { if (*type == "chat") { getStanzaGeneric()->setType(Message::Chat); } else if (*type == "error") { diff --git a/Swiften/Session/BOSHSessionStream.cpp b/Swiften/Session/BOSHSessionStream.cpp index c5d0dd5..99af71d 100644 --- a/Swiften/Session/BOSHSessionStream.cpp +++ b/Swiften/Session/BOSHSessionStream.cpp @@ -61,19 +61,19 @@ BOSHSessionStream::BOSHSessionStream(const URL& boshURL, xmppLayer->onStreamStart.connect(boost::bind(&BOSHSessionStream::handleStreamStartReceived, this, _1)); xmppLayer->onElement.connect(boost::bind(&BOSHSessionStream::handleElementReceived, this, _1)); xmppLayer->onError.connect(boost::bind(&BOSHSessionStream::handleXMPPError, this)); xmppLayer->onWriteData.connect(boost::bind(&BOSHSessionStream::handleXMPPLayerDataWritten, this, _1)); available = true; } BOSHSessionStream::~BOSHSessionStream() { - close(); + BOSHSessionStream::close(); connectionPool->onSessionTerminated.disconnect(boost::bind(&BOSHSessionStream::handlePoolSessionTerminated, this, _1)); connectionPool->onSessionStarted.disconnect(boost::bind(&BOSHSessionStream::handlePoolSessionStarted, this)); connectionPool->onXMPPDataRead.disconnect(boost::bind(&BOSHSessionStream::handlePoolXMPPDataRead, this, _1)); connectionPool->onBOSHDataRead.disconnect(boost::bind(&BOSHSessionStream::handlePoolBOSHDataRead, this, _1)); connectionPool->onBOSHDataWritten.disconnect(boost::bind(&BOSHSessionStream::handlePoolBOSHDataWritten, this, _1)); delete connectionPool; connectionPool = NULL; xmppLayer->onStreamStart.disconnect(boost::bind(&BOSHSessionStream::handleStreamStartReceived, this, _1)); xmppLayer->onElement.disconnect(boost::bind(&BOSHSessionStream::handleElementReceived, this, _1)); diff --git a/Swiften/Session/BOSHSessionStream.h b/Swiften/Session/BOSHSessionStream.h index 817f5e9..191a6f4 100644 --- a/Swiften/Session/BOSHSessionStream.h +++ b/Swiften/Session/BOSHSessionStream.h @@ -43,19 +43,19 @@ namespace Swift { EventLoop* eventLoop, DomainNameResolver* resolver, const std::string& to, const URL& boshHTTPConnectProxyURL, const SafeString& boshHTTPConnectProxyAuthID, const SafeString& boshHTTPConnectProxyAuthPassword, const TLSOptions& tlsOptions, boost::shared_ptr<HTTPTrafficFilter> trafficFilter ); - ~BOSHSessionStream(); + virtual ~BOSHSessionStream(); virtual void close(); virtual bool isOpen(); virtual void writeHeader(const ProtocolHeader& header); virtual void writeElement(boost::shared_ptr<ToplevelElement>); virtual void writeFooter(); virtual void writeData(const std::string& data); |
Swift