From 0e17d9322793e8baf7ef6904dc96f388e79fd82e Mon Sep 17 00:00:00 2001 From: Kevin Smith Date: Tue, 25 Feb 2014 17:59:45 +0000 Subject: Build with new Boostish stuff. Can no longer use a shared_ptr as a bool. Change-Id: Ic92ede082e8f923830af943bb522c64e4f5ff453 diff --git a/Swift/Controllers/Chat/ChatController.cpp b/Swift/Controllers/Chat/ChatController.cpp index fd6da94..fb69366 100644 --- a/Swift/Controllers/Chat/ChatController.cpp +++ b/Swift/Controllers/Chat/ChatController.cpp @@ -186,7 +186,7 @@ void ChatController::preHandleIncomingMessage(boost::shared_ptr me } } chatStateTracker_->handleMessageReceived(message); - chatStateNotifier_->receivedMessageFromContact(message->getPayload()); + chatStateNotifier_->receivedMessageFromContact(!!message->getPayload()); // handle XEP-0184 Message Receipts // incomming receipts diff --git a/Swift/Controllers/Chat/ChatsManager.cpp b/Swift/Controllers/Chat/ChatsManager.cpp index fef9039..919a3d6 100644 --- a/Swift/Controllers/Chat/ChatsManager.cpp +++ b/Swift/Controllers/Chat/ChatsManager.cpp @@ -798,7 +798,7 @@ void ChatsManager::handleSearchMUCRequest() { void ChatsManager::handleIncomingMessage(boost::shared_ptr message) { JID jid = message->getFrom(); boost::shared_ptr event(new MessageEvent(message)); - bool isInvite = message->getPayload(); + bool isInvite = !!message->getPayload(); bool isMediatedInvite = (message->getPayload() && message->getPayload()->getInvite()); if (isMediatedInvite) { jid = (*message->getPayload()->getInvite()).from; diff --git a/Swiften/LinkLocal/LinkLocalServiceBrowser.cpp b/Swiften/LinkLocal/LinkLocalServiceBrowser.cpp index 4b68a33..ae97933 100644 --- a/Swiften/LinkLocal/LinkLocalServiceBrowser.cpp +++ b/Swiften/LinkLocal/LinkLocalServiceBrowser.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010 Remko Tronçon + * Copyright (c) 2010-2014 Remko Tronçon * Licensed under the GNU General Public License v3. * See Documentation/Licenses/GPLv3.txt for more information. */ @@ -52,7 +52,7 @@ void LinkLocalServiceBrowser::stop() { } bool LinkLocalServiceBrowser::isRunning() const { - return browseQuery; + return !!browseQuery; } bool LinkLocalServiceBrowser::hasError() const { @@ -60,7 +60,7 @@ bool LinkLocalServiceBrowser::hasError() const { } bool LinkLocalServiceBrowser::isRegistered() const { - return registerQuery; + return !!registerQuery; } void LinkLocalServiceBrowser::registerService(const std::string& name, int port, const LinkLocalServiceInfo& info) { diff --git a/Swiften/Network/BOSHConnection.cpp b/Swiften/Network/BOSHConnection.cpp index 23772eb..83f12f7 100644 --- a/Swiften/Network/BOSHConnection.cpp +++ b/Swiften/Network/BOSHConnection.cpp @@ -5,7 +5,7 @@ */ /* - * Copyright (c) 2011 Kevin Smith + * Copyright (c) 2011-2014 Kevin Smith * Licensed under the GNU General Public License v3. * See Documentation/Licenses/GPLv3.txt for more information. */ @@ -135,7 +135,7 @@ void BOSHConnection::write(const SafeByteArray& data, bool streamRestart, bool t void BOSHConnection::handleConnectFinished(Connection::ref connection) { cancelConnector(); - connectionReady_ = connection; + connectionReady_ = !!connection; if (connectionReady_) { connection_ = connection; connection_->onDataRead.connect(boost::bind(&BOSHConnection::handleDataRead, shared_from_this(), _1)); diff --git a/Swiften/Serializer/GenericElementSerializer.h b/Swiften/Serializer/GenericElementSerializer.h index e56f156..92f7737 100644 --- a/Swiften/Serializer/GenericElementSerializer.h +++ b/Swiften/Serializer/GenericElementSerializer.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010 Remko Tronçon + * Copyright (c) 2010-2014 Remko Tronçon * Licensed under the GNU General Public License v3. * See Documentation/Licenses/GPLv3.txt for more information. */ @@ -17,7 +17,7 @@ namespace Swift { virtual SafeByteArray serialize(boost::shared_ptr element) const = 0; virtual bool canSerialize(boost::shared_ptr element) const { - return boost::dynamic_pointer_cast(element); + return !!boost::dynamic_pointer_cast(element); } }; } diff --git a/Swiften/Serializer/GenericPayloadSerializer.h b/Swiften/Serializer/GenericPayloadSerializer.h index b501613..7b01824 100644 --- a/Swiften/Serializer/GenericPayloadSerializer.h +++ b/Swiften/Serializer/GenericPayloadSerializer.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010 Remko Tronçon + * Copyright (c) 2010-2014 Remko Tronçon * Licensed under the GNU General Public License v3. * See Documentation/Licenses/GPLv3.txt for more information. */ @@ -19,7 +19,7 @@ namespace Swift { } virtual bool canSerialize(boost::shared_ptr element) const { - return boost::dynamic_pointer_cast(element); + return !!boost::dynamic_pointer_cast(element); } virtual std::string serializePayload(boost::shared_ptr) const = 0; -- cgit v0.10.2-6-g49f6