summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swiften/Base')
-rw-r--r--Swiften/Base/Debug.cpp11
-rw-r--r--Swiften/Base/SafeByteArray.h15
2 files changed, 12 insertions, 14 deletions
diff --git a/Swiften/Base/Debug.cpp b/Swiften/Base/Debug.cpp
index 2d306d5..b59de35 100644
--- a/Swiften/Base/Debug.cpp
+++ b/Swiften/Base/Debug.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015 Isode Limited.
+ * Copyright (c) 2015-2016 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
@@ -7,8 +7,7 @@
#include <Swiften/Base/Debug.h>
#include <iostream>
-
-#include <boost/shared_ptr.hpp>
+#include <memory>
#include <Swiften/Client/ClientError.h>
#include <Swiften/Serializer/PayloadSerializer.h>
@@ -119,16 +118,16 @@ std::ostream& operator<<(std::ostream& os, const Swift::ClientError& error) {
std::ostream& operator<<(std::ostream& os, Swift::Element* ele) {
using namespace Swift;
- boost::shared_ptr<Element> element = boost::shared_ptr<Element>(ele);
+ std::shared_ptr<Element> element = std::shared_ptr<Element>(ele);
- boost::shared_ptr<Payload> payload = boost::dynamic_pointer_cast<Payload>(element);
+ std::shared_ptr<Payload> payload = std::dynamic_pointer_cast<Payload>(element);
if (payload) {
FullPayloadSerializerCollection payloadSerializerCollection;
PayloadSerializer *serializer = payloadSerializerCollection.getPayloadSerializer(payload);
os << "Payload(" << serializer->serialize(payload) << ")";
return os;
}
- boost::shared_ptr<ToplevelElement> topLevelElement = boost::dynamic_pointer_cast<ToplevelElement>(element);
+ std::shared_ptr<ToplevelElement> topLevelElement = std::dynamic_pointer_cast<ToplevelElement>(element);
if (topLevelElement) {
FullPayloadSerializerCollection payloadSerializerCollection;
XMPPSerializer xmppSerializer(&payloadSerializerCollection, ClientStreamType, false);
diff --git a/Swiften/Base/SafeByteArray.h b/Swiften/Base/SafeByteArray.h
index f824194..342c185 100644
--- a/Swiften/Base/SafeByteArray.h
+++ b/Swiften/Base/SafeByteArray.h
@@ -6,10 +6,9 @@
#pragma once
+#include <memory>
#include <vector>
-#include <boost/smart_ptr/make_shared.hpp>
-
#include <Swiften/Base/API.h>
#include <Swiften/Base/ByteArray.h>
#include <Swiften/Base/SafeAllocator.h>
@@ -27,8 +26,8 @@ namespace Swift {
return SafeByteArray(s.begin(), s.end());
}
- inline boost::shared_ptr<SafeByteArray> createSafeByteArrayRef(const std::string& s) {
- return boost::make_shared<SafeByteArray>(s.begin(), s.end());
+ inline std::shared_ptr<SafeByteArray> createSafeByteArrayRef(const std::string& s) {
+ return std::make_shared<SafeByteArray>(s.begin(), s.end());
}
inline SafeByteArray createSafeByteArray(char c) {
@@ -39,16 +38,16 @@ namespace Swift {
return SafeByteArray(c, c + n);
}
- inline boost::shared_ptr<SafeByteArray> createSafeByteArrayRef(const char* c, size_t n) {
- return boost::make_shared<SafeByteArray>(c, c + n);
+ inline std::shared_ptr<SafeByteArray> createSafeByteArrayRef(const char* c, size_t n) {
+ return std::make_shared<SafeByteArray>(c, c + n);
}
inline SafeByteArray createSafeByteArray(const unsigned char* c, size_t n) {
return SafeByteArray(c, c + n);
}
- inline boost::shared_ptr<SafeByteArray> createSafeByteArrayRef(const unsigned char* c, size_t n) {
- return boost::make_shared<SafeByteArray>(c, c + n);
+ inline std::shared_ptr<SafeByteArray> createSafeByteArrayRef(const unsigned char* c, size_t n) {
+ return std::make_shared<SafeByteArray>(c, c + n);
}
/* WARNING! This breaks the safety of the data in the safe byte array.