summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2011-06-13 13:52:30 (GMT)
committerRemko Tronçon <git@el-tramo.be>2011-06-13 13:52:30 (GMT)
commit645876deedb72aa8ebd2a56773f7dd5bb0133b71 (patch)
treefe1820b9e5aebe5b8f69359a2f0ea1a8f4b9a71c /Swiften/Elements/IBB.h
parent643999af94c4fede5e1348da91ad539235b9d60f (diff)
downloadswift-contrib-645876deedb72aa8ebd2a56773f7dd5bb0133b71.zip
swift-contrib-645876deedb72aa8ebd2a56773f7dd5bb0133b71.tar.bz2
Fixed some CppCheck warnings.
Diffstat (limited to 'Swiften/Elements/IBB.h')
-rw-r--r--Swiften/Elements/IBB.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/Swiften/Elements/IBB.h b/Swiften/Elements/IBB.h
index 8138e83..64c9f14 100644
--- a/Swiften/Elements/IBB.h
+++ b/Swiften/Elements/IBB.h
@@ -9,6 +9,7 @@
#include <string>
#include <vector>
#include <boost/shared_ptr.hpp>
+#include <boost/smart_ptr/make_shared.hpp>
#include <Swiften/Elements/Payload.h>
@@ -31,20 +32,20 @@ namespace Swift {
}
static IBB::ref createIBBOpen(const std::string& streamID, int blockSize) {
- IBB::ref result(new IBB(Open, streamID));
+ IBB::ref result = boost::make_shared<IBB>(Open, streamID);
result->setBlockSize(blockSize);
return result;
}
static IBB::ref createIBBData(const std::string& streamID, int sequenceNumber, const std::vector<unsigned char>& data) {
- IBB::ref result(new IBB(Data, streamID));
+ IBB::ref result = boost::make_shared<IBB>(Data, streamID);
result->setSequenceNumber(sequenceNumber);
result->setData(data);
return result;
}
static IBB::ref createIBBClose(const std::string& streamID) {
- return IBB::ref(new IBB(Close, streamID));
+ return boost::make_shared<IBB>(Close, streamID);
}
void setAction(Action action) {