diff options
Diffstat (limited to 'Swiften/Chat/ChatStateNotifier.cpp')
| -rw-r--r-- | Swiften/Chat/ChatStateNotifier.cpp | 17 | 
1 files changed, 9 insertions, 8 deletions
| diff --git a/Swiften/Chat/ChatStateNotifier.cpp b/Swiften/Chat/ChatStateNotifier.cpp index 6e0f458..d507c4d 100644 --- a/Swiften/Chat/ChatStateNotifier.cpp +++ b/Swiften/Chat/ChatStateNotifier.cpp @@ -4,14 +4,15 @@   * See Documentation/Licenses/GPLv3.txt for more information.   */ -#include "Swiften/Chat/ChatStateNotifier.h" +#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" -#include "Swiften/Client/StanzaChannel.h" -#include "Swiften/Disco/EntityCapsProvider.h" +#include <Swiften/Elements/Message.h> +#include <Swiften/Elements/ChatState.h> +#include <Swiften/Client/StanzaChannel.h> +#include <Swiften/Disco/EntityCapsProvider.h>  namespace Swift { @@ -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));  	}  } | 
 Swift
 Swift