diff options
author | Remko Tronçon <git@el-tramo.be> | 2011-05-13 22:11:39 (GMT) |
---|---|---|
committer | Remko Tronçon <git@el-tramo.be> | 2011-05-13 22:11:39 (GMT) |
commit | e8ce0b8e97466e9fa849da6a8c0a4df77fbd0ddd (patch) | |
tree | d8599da048c74482def31335d1a881656db188cf /Swiften/Chat | |
parent | 27d7cb1c99a55bfb45658b4f20f901926e526cae (diff) | |
download | swift-e8ce0b8e97466e9fa849da6a8c0a4df77fbd0ddd.zip swift-e8ce0b8e97466e9fa849da6a8c0a4df77fbd0ddd.tar.bz2 |
Removed some explicit new's.
Diffstat (limited to 'Swiften/Chat')
-rw-r--r-- | Swiften/Chat/ChatStateNotifier.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Swiften/Chat/ChatStateNotifier.cpp b/Swiften/Chat/ChatStateNotifier.cpp index 498c76d..d507c4d 100644 --- a/Swiften/Chat/ChatStateNotifier.cpp +++ b/Swiften/Chat/ChatStateNotifier.cpp @@ -7,6 +7,7 @@ #include <Swiften/Chat/ChatStateNotifier.h> #include <boost/bind.hpp> +#include <boost/smart_ptr/make_shared.hpp> #include <Swiften/Elements/Message.h> #include <Swiften/Elements/ChatState.h> @@ -68,15 +69,15 @@ bool ChatStateNotifier::contactShouldReceiveStates() { } void ChatStateNotifier::changeState(ChatState::ChatStateType state) { - boost::shared_ptr<Message> message(new Message()); + boost::shared_ptr<Message> message(boost::make_shared<Message>()); message->setTo(contact_); - message->addPayload(boost::shared_ptr<Payload>(new ChatState(state))); + message->addPayload(boost::make_shared<ChatState>(state)); stanzaChannel_->sendMessage(message); } void ChatStateNotifier::addChatStateRequest(Message::ref message) { if (contactShouldReceiveStates()) { - message->addPayload(boost::shared_ptr<Payload>(new ChatState(ChatState::Active))); + message->addPayload(boost::make_shared<ChatState>(ChatState::Active)); } } |