diff options
author | Tobias Markmann <tm@ayena.de> | 2012-03-20 00:05:55 (GMT) |
---|---|---|
committer | Remko Tronçon <git@el-tramo.be> | 2012-03-20 19:13:43 (GMT) |
commit | 3d6694b0c698fff63d11f8bb4aa995c1df882315 (patch) | |
tree | a46ccace647f23a65100cf69c951345aa6dea7ab /Swift/Controllers/MainController.cpp | |
parent | 3d27d98ccc232ae7bfacfd5a3f85f44b6c2e9cc9 (diff) | |
download | swift-contrib-3d6694b0c698fff63d11f8bb4aa995c1df882315.zip swift-contrib-3d6694b0c698fff63d11f8bb4aa995c1df882315.tar.bz2 |
boost::shared_ptr<?>(new ?(...)) -> boost::make_shared<?>(...) transformation where possible.
License: This patch is BSD-licensed, see http://www.opensource.org/licenses/bsd-license.php
Diffstat (limited to 'Swift/Controllers/MainController.cpp')
-rw-r--r-- | Swift/Controllers/MainController.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Swift/Controllers/MainController.cpp b/Swift/Controllers/MainController.cpp index cd7e673..e923cff 100644 --- a/Swift/Controllers/MainController.cpp +++ b/Swift/Controllers/MainController.cpp @@ -381,7 +381,7 @@ void MainController::sendPresence(boost::shared_ptr<Presence> presence) { // Add information and send if (!vCardPhotoHash_.empty()) { - presence->updatePayload(boost::shared_ptr<VCardUpdate>(new VCardUpdate(vCardPhotoHash_))); + presence->updatePayload(boost::make_shared<VCardUpdate>(vCardPhotoHash_)); } client_->getPresenceSender()->sendPresence(presence); if (presence->getType() == Presence::Unavailable) { @@ -582,7 +582,7 @@ void MainController::handleDisconnected(const boost::optional<ClientError>& erro } else { message = str(format(QT_TRANSLATE_NOOP("", "Disconnected from %1%: %2%.")) % jid_.getDomain() % message); } - lastDisconnectError_ = boost::shared_ptr<ErrorEvent>(new ErrorEvent(JID(jid_.getDomain()), message)); + lastDisconnectError_ = boost::make_shared<ErrorEvent>(JID(jid_.getDomain()), message); eventController_->handleIncomingEvent(lastDisconnectError_); } } @@ -675,7 +675,7 @@ void MainController::handleNotificationClicked(const JID& jid) { assert(chatsManager_); if (clientInitialized_) { if (client_->getMUCRegistry()->isMUC(jid)) { - uiEventStream_->send(boost::shared_ptr<JoinMUCUIEvent>(new JoinMUCUIEvent(jid))); + uiEventStream_->send(boost::make_shared<JoinMUCUIEvent>(jid)); } else { uiEventStream_->send(boost::shared_ptr<UIEvent>(new RequestChatUIEvent(jid))); |