diff options
author | Remko Tronçon <git@el-tramo.be> | 2011-06-13 13:52:30 (GMT) |
---|---|---|
committer | Remko Tronçon <git@el-tramo.be> | 2011-06-13 13:52:30 (GMT) |
commit | 645876deedb72aa8ebd2a56773f7dd5bb0133b71 (patch) | |
tree | fe1820b9e5aebe5b8f69359a2f0ea1a8f4b9a71c /Swiften/Elements/IBB.h | |
parent | 643999af94c4fede5e1348da91ad539235b9d60f (diff) | |
download | swift-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.h | 7 |
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) { |