diff options
author | Remko Tronçon <git@el-tramo.be> | 2014-01-18 18:33:52 (GMT) |
---|---|---|
committer | Swift Review <review@swift.im> | 2014-02-13 10:56:56 (GMT) |
commit | ba0a79a6fa68f2757795e96a22ff310ebe41a715 (patch) | |
tree | 905b4645ce2141c2b63dc574cb3a9ac751fe0e63 /Swiften/Base/SafeAllocator.h | |
parent | f44ea24fda0f08195180215a30bc626d7c1907c5 (diff) | |
download | swift-ba0a79a6fa68f2757795e96a22ff310ebe41a715.zip swift-ba0a79a6fa68f2757795e96a22ff310ebe41a715.tar.bz2 |
Fix clang warnings
Change-Id: I7cd26f00f626b64da934e9f5594db393d6184b9c
Diffstat (limited to 'Swiften/Base/SafeAllocator.h')
-rw-r--r-- | Swiften/Base/SafeAllocator.h | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/Swiften/Base/SafeAllocator.h b/Swiften/Base/SafeAllocator.h index b01d77d..8a8b25e 100644 --- a/Swiften/Base/SafeAllocator.h +++ b/Swiften/Base/SafeAllocator.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011-2013 Remko Tronçon + * Copyright (c) 2011-2014 Remko Tronçon * Licensed under the GNU General Public License v3. * See Documentation/Licenses/GPLv3.txt for more information. */ @@ -9,6 +9,8 @@ #include <vector> #include <algorithm> +#include <Swiften/Base/API.h> + namespace Swift { void secureZeroMemory(char* memory, size_t numberOfBytes); @@ -19,16 +21,16 @@ namespace Swift { typedef SafeAllocator<U> other; }; - SafeAllocator() throw() {} - SafeAllocator(const SafeAllocator&) throw() : std::allocator<T>() {} - template <class U> SafeAllocator(const SafeAllocator<U>&) throw() {} - ~SafeAllocator() throw() {} + SafeAllocator() SWIFTEN_NOEXCEPT {} + SafeAllocator(const SafeAllocator&) SWIFTEN_NOEXCEPT : std::allocator<T>() {} + template <class U> SafeAllocator(const SafeAllocator<U>&) SWIFTEN_NOEXCEPT {} + ~SafeAllocator() SWIFTEN_NOEXCEPT {} void deallocate (T* p, size_t num) { secureZeroMemory(reinterpret_cast<char*>(p), num); std::allocator<T>::deallocate(p, num); } - private: + SWIFTEN_DEFAULT_COPY_ASSIGMNENT_OPERATOR(SafeAllocator) }; } |