diff options
Diffstat (limited to 'Swiften/Base/SafeByteArray.h')
-rw-r--r-- | Swiften/Base/SafeByteArray.h | 15 |
1 files changed, 7 insertions, 8 deletions
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. |