summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/SwiftenDevelopersGuide/Examples/EchoBot/EchoBot6.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/Documentation/SwiftenDevelopersGuide/Examples/EchoBot/EchoBot6.cpp b/Documentation/SwiftenDevelopersGuide/Examples/EchoBot/EchoBot6.cpp
index 4c96f6b..7bbeaaf 100644
--- a/Documentation/SwiftenDevelopersGuide/Examples/EchoBot/EchoBot6.cpp
+++ b/Documentation/SwiftenDevelopersGuide/Examples/EchoBot/EchoBot6.cpp
@@ -7,6 +7,7 @@
//...
#include <iostream>
#include <boost/bind.hpp>
+#include <boost/smart_ptr/make_shared.hpp>
#include <Swiften/Swiften.h>
@@ -88,7 +89,7 @@ class EchoBot {
message->setFrom(JID());
//...
if (!message->getPayload<EchoPayload>()) {
- boost::shared_ptr<EchoPayload> echoPayload(new EchoPayload());
+ boost::shared_ptr<EchoPayload> echoPayload = boost::make_shared<EchoPayload>();
echoPayload->setMessage("This is an echoed message");
message->addPayload(echoPayload);
client->sendMessage(message);