Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r81237 - trunk/boost/smart_ptr/detail
From: glenfe_at_[hidden]
Date: 2012-11-07 13:58:42


Author: glenfe
Date: 2012-11-07 13:58:41 EST (Wed, 07 Nov 2012)
New Revision: 81237
URL: http://svn.boost.org/trac/boost/changeset/81237

Log:
Simplify array_deleter interface
Text files modified:
   trunk/boost/smart_ptr/detail/array_deleter.hpp | 12 ++++++------
   1 files changed, 6 insertions(+), 6 deletions(-)

Modified: trunk/boost/smart_ptr/detail/array_deleter.hpp
==============================================================================
--- trunk/boost/smart_ptr/detail/array_deleter.hpp (original)
+++ trunk/boost/smart_ptr/detail/array_deleter.hpp 2012-11-07 13:58:41 EST (Wed, 07 Nov 2012)
@@ -23,23 +23,23 @@
             ~array_deleter() {
                 destroy();
             }
- void construct(void* memory, std::size_t count) {
- for (object = static_cast<T*>(memory); size < count; size++) {
+ void construct(T* memory, std::size_t count) {
+ for (object = memory; size < count; size++) {
                     void* p1 = object + size;
                     ::new(p1) T();
                 }
             }
 #if defined(BOOST_HAS_VARIADIC_TMPL) && defined(BOOST_HAS_RVALUE_REFS)
             template<typename... Args>
- void construct(void* memory, std::size_t count, Args&&... args) {
- for (object = static_cast<T*>(memory); size < count; size++) {
+ void construct(T* memory, std::size_t count, Args&&... args) {
+ for (object = memory; size < count; size++) {
                     void* p1 = object + size;
                     ::new(p1) T(args...);
                 }
             }
 #endif
- void construct_noinit(void* memory, std::size_t count) {
- for (object = static_cast<T*>(memory); size < count; size++) {
+ void construct_noinit(T* memory, std::size_t count) {
+ for (object = memory; size < count; size++) {
                     void* p1 = object + size;
                     ::new(p1) T;
                 }


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk