summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2010-12-05 13:36:00 (GMT)
committerRemko Tronçon <git@el-tramo.be>2010-12-05 13:36:00 (GMT)
commit5c30503d671d54c3e2950be7b4f17a1ba5843475 (patch)
tree5bb9dd3856e9c9e4b15dfe1ab7cdb0bbb1c8b8e3 /Documentation/SwiftenDevelopersGuide
parent33cd40af8a271a8994b4c2fc71395e338779d4dc (diff)
downloadswift-contrib-5c30503d671d54c3e2950be7b4f17a1ba5843475.zip
swift-contrib-5c30503d671d54c3e2950be7b4f17a1ba5843475.tar.bz2
Import boost::make_shared.
Diffstat (limited to 'Documentation/SwiftenDevelopersGuide')
-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);