summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swiften/MUC/MUCBookmarkManager.cpp')
-rw-r--r--Swiften/MUC/MUCBookmarkManager.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/Swiften/MUC/MUCBookmarkManager.cpp b/Swiften/MUC/MUCBookmarkManager.cpp
index 643a8c4..8a63745 100644
--- a/Swiften/MUC/MUCBookmarkManager.cpp
+++ b/Swiften/MUC/MUCBookmarkManager.cpp
@@ -1,18 +1,19 @@
/*
* Copyright (c) 2010 Remko Tronçon
* Licensed under the GNU General Public License v3.
* See Documentation/Licenses/GPLv3.txt for more information.
*/
#include "MUCBookmarkManager.h"
#include <boost/bind.hpp>
+#include <boost/smart_ptr/make_shared.hpp>
#include <iostream>
#include <Swiften/Base/foreach.h>
#include <Swiften/Queries/IQRouter.h>
#include <Swiften/Queries/Requests/GetPrivateStorageRequest.h>
#include <Swiften/Queries/Requests/SetPrivateStorageRequest.h>
namespace Swift {
@@ -92,19 +93,19 @@ void MUCBookmarkManager::removeBookmark(const MUCBookmark& bookmark) {
onBookmarkRemoved(bookmark);
break;
}
}
flush();
}
void MUCBookmarkManager::flush() {
if (!storage) {
- storage = boost::shared_ptr<Storage>(new Storage());
+ storage = boost::make_shared<Storage>();
}
// Update the storage element
storage->clearRooms();
foreach(const MUCBookmark& bookmark, bookmarks_) {
storage->addRoom(bookmark.toStorage());
}
// Send an iq to save the storage element
SetPrivateStorageRequest<Storage>::ref request = SetPrivateStorageRequest<Storage>::create(storage, iqRouter_);