Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r81685 - trunk/boost/smart_ptr/detail
From: glenfe_at_[hidden]
Date: 2012-12-03 00:56:18


Author: glenfe
Date: 2012-12-03 00:56:17 EST (Mon, 03 Dec 2012)
New Revision: 81685
URL: http://svn.boost.org/trac/boost/changeset/81685

Log:
Minor cosmetic change in detail array_deleter
Text files modified:
   trunk/boost/smart_ptr/detail/array_deleter.hpp | 132 ++++++++++++++++++++--------------------
   1 files changed, 66 insertions(+), 66 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-12-03 00:56:17 EST (Mon, 03 Dec 2012)
@@ -1,9 +1,9 @@
 /*
- * Copyright (c) 2012 Glen Joseph Fernandes
+ * Copyright (c) 2012 Glen Joseph Fernandes
  * glenfe at live dot com
  *
- * Distributed under the Boost Software License,
- * Version 1.0. (See accompanying file LICENSE_1_0.txt
+ * Distributed under the Boost Software License,
+ * Version 1.0. (See accompanying file LICENSE_1_0.txt
  * or copy at http://boost.org/LICENSE_1_0.txt)
  */
 #ifndef BOOST_SMART_PTR_DETAIL_ARRAY_DELETER_HPP
@@ -19,7 +19,7 @@
         template<typename T>
         class array_deleter<T[]> {
         public:
- array_deleter(std::size_t size)
+ array_deleter(std::size_t size)
                 : size(size),
                   object(0) {
             }
@@ -27,66 +27,66 @@
                 destroy(size);
             }
             void construct(T* memory) {
- object = memory;
- for (std::size_t i = 0; i < size; i++) {
- try {
+ std::size_t i = 0;
+ try {
+ for (object = memory; i < size; i++) {
                         void* p1 = memory + i;
                         ::new(p1) T();
- } catch (...) {
- destroy(i);
- throw;
                     }
+ } catch (...) {
+ destroy(i);
+ throw;
                 }
             }
 #if defined(BOOST_HAS_VARIADIC_TMPL) && defined(BOOST_HAS_RVALUE_REFS)
             template<typename... Args>
             void construct(T* memory, Args&&... args) {
- object = memory;
- for (std::size_t i = 0; i < size; i++) {
- try {
+ std::size_t i = 0;
+ try {
+ for (object = memory; i < size; i++) {
                         void* p1 = memory + i;
                         ::new(p1) T(args...);
- } catch (...) {
- destroy(i);
- throw;
                     }
+ } catch (...) {
+ destroy(i);
+ throw;
                 }
             }
 #endif
             void construct_list(T* memory, const T* list) {
- object = memory;
- for (std::size_t i = 0; i < size; i++) {
- try {
+ std::size_t i = 0;
+ try {
+ for (object = memory; i < size; i++) {
                         void* p1 = memory + i;
                         ::new(p1) T(list[i]);
- } catch (...) {
- destroy(i);
- throw;
                     }
+ } catch (...) {
+ destroy(i);
+ throw;
                 }
             }
             void construct_list(T* memory, const T* list, std::size_t n) {
- object = memory;
- for (std::size_t i = 0; i < size; i++) {
- try {
+ std::size_t i = 0;
+ try {
+ for (object = memory; i < size; i++) {
                         void* p1 = memory + i;
                         ::new(p1) T(list[i % n]);
- } catch (...) {
- destroy(i);
- throw;
                     }
+ } catch (...) {
+ destroy(i);
+ throw;
                 }
             }
             void construct_noinit(T* memory) {
- object = memory;
- for (std::size_t i = 0; i < size; i++) {
- try {
+ std::size_t i = 0;
+ try {
+ for (object = memory; i < size; i++) {
                         void* p1 = memory + i;
                         ::new(p1) T;
- } catch (...) {
- destroy(i);
- throw;
                     }
+ } catch (...) {
+ destroy(i);
+ throw;
                 }
             }
             void operator()(const void*) {
@@ -107,73 +107,73 @@
         template<typename T, std::size_t N>
         class array_deleter<T[N]> {
         public:
- array_deleter()
+ array_deleter()
                 : object(0) {
             }
             ~array_deleter() {
                 destroy(N);
             }
             void construct(T* memory) {
- object = memory;
- for (std::size_t i = 0; i < N; i++) {
- try {
+ std::size_t i = 0;
+ try {
+ for (object = memory; i < N; i++) {
                         void* p1 = memory + i;
                         ::new(p1) T();
- } catch (...) {
- destroy(i);
- throw;
                     }
+ } catch (...) {
+ destroy(i);
+ throw;
                 }
             }
 #if defined(BOOST_HAS_VARIADIC_TMPL) && defined(BOOST_HAS_RVALUE_REFS)
             template<typename... Args>
             void construct(T* memory, Args&&... args) {
- object = memory;
- for (std::size_t i = 0; i < N; i++) {
- try {
+ std::size_t i = 0;
+ try {
+ for (object = memory; i < N; i++) {
                         void* p1 = memory + i;
                         ::new(p1) T(args...);
- } catch (...) {
- destroy(i);
- throw;
                     }
+ } catch (...) {
+ destroy(i);
+ throw;
                 }
             }
 #endif
             void construct_list(T* memory, const T* list) {
- object = memory;
- for (std::size_t i = 0; i < N; i++) {
- try {
+ std::size_t i = 0;
+ try {
+ for (object = memory; i < N; i++) {
                         void* p1 = memory + i;
                         ::new(p1) T(list[i]);
- } catch (...) {
- destroy(i);
- throw;
                     }
+ } catch (...) {
+ destroy(i);
+ throw;
                 }
             }
             void construct_list(T* memory, const T* list, std::size_t n) {
- object = memory;
- for (std::size_t i = 0; i < N; i++) {
- try {
- void* p1 = memory + i;
+ std::size_t i = 0;
+ try {
+ for (object = memory; i < N; i++) {
+ void* p1 = memory + i;
                         ::new(p1) T(list[i % n]);
- } catch (...) {
- destroy(i);
- throw;
                     }
+ } catch (...) {
+ destroy(i);
+ throw;
                 }
             }
             void construct_noinit(T* memory) {
- object = memory;
- for (std::size_t i = 0; i < N; i++) {
- try {
+ std::size_t i = 0;
+ try {
+ for (object = memory; i < N; i++) {
                         void* p1 = memory + i;
                         ::new(p1) T;
- } catch (...) {
- destroy(i);
- throw;
                     }
+ } catch (...) {
+ destroy(i);
+ throw;
                 }
             }
             void operator()(const void*) {


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