Boost logo

Boost-Commit :

From: igaztanaga_at_[hidden]
Date: 2008-06-27 14:19:40


Author: igaztanaga
Date: 2008-06-27 14:19:38 EDT (Fri, 27 Jun 2008)
New Revision: 46786
URL: http://svn.boost.org/trac/boost/changeset/46786

Log:
Some fixes for inspection report, Run Date: 15:00:47 UTC, Friday 27 June 2008
Removed:
   trunk/boost/interprocess/sync/math_functions.hpp
Text files modified:
   trunk/boost/interprocess/containers/string.hpp | 12 ++++++------
   trunk/boost/interprocess/containers/vector.hpp | 12 ++++++------
   trunk/boost/interprocess/detail/algorithms.hpp | 4 ++--
   trunk/boost/interprocess/detail/config_begin.hpp | 25 +++++++++++++++++--------
   trunk/boost/interprocess/detail/config_end.hpp | 9 +++++++++
   trunk/boost/interprocess/detail/math_functions.hpp | 2 +-
   trunk/boost/interprocess/smart_ptr/detail/sp_counted_base.hpp | 11 +++++++++++
   trunk/boost/intrusive/detail/utilities.hpp | 2 +-
   trunk/boost/intrusive/slist.hpp | 2 +-
   9 files changed, 54 insertions(+), 25 deletions(-)

Modified: trunk/boost/interprocess/containers/string.hpp
==============================================================================
--- trunk/boost/interprocess/containers/string.hpp (original)
+++ trunk/boost/interprocess/containers/string.hpp 2008-06-27 14:19:38 EDT (Fri, 27 Jun 2008)
@@ -1952,7 +1952,7 @@
           const detail::moved_object<basic_string<CharT,Traits,A> >& my)
 {
    typedef typename basic_string<CharT,Traits,A>::size_type size_type;
- return my.get().replace(size_type(0), size_type(0), x);
+ return my.get().replace(size_type(0), size_type(0), x);
 }
 #else
 template <class CharT, class Traits, class A>
@@ -1961,7 +1961,7 @@
           basic_string<CharT,Traits,A> && my)
 {
    typedef typename basic_string<CharT,Traits,A>::size_type size_type;
- return my.replace(size_type(0), size_type(0), x);
+ return my.replace(size_type(0), size_type(0), x);
 }
 #endif
 
@@ -1986,7 +1986,7 @@
           const detail::moved_object<basic_string<CharT,Traits,A> >& my)
 {
    typedef typename basic_string<CharT,Traits,A>::size_type size_type;
- return my.get().replace(size_type(0), size_type(0), s);
+ return my.get().replace(size_type(0), size_type(0), s);
 }
 #else
 template <class CharT, class Traits, class A>
@@ -1995,7 +1995,7 @@
           basic_string<CharT,Traits,A> && my)
 {
    typedef typename basic_string<CharT,Traits,A>::size_type size_type;
- return detail::move_impl(my.get().replace(size_type(0), size_type(0), s));
+ return detail::move_impl(my.get().replace(size_type(0), size_type(0), s));
 }
 #endif
 
@@ -2019,7 +2019,7 @@
           const detail::moved_object<basic_string<CharT,Traits,A> >& my)
 {
    typedef typename basic_string<CharT,Traits,A>::size_type size_type;
- return my.get().replace(size_type(0), size_type(0), &c, &c + 1);
+ return my.get().replace(size_type(0), size_type(0), &c, &c + 1);
 }
 #else
 template <class CharT, class Traits, class A>
@@ -2028,7 +2028,7 @@
           basic_string<CharT,Traits,A> && my)
 {
    typedef typename basic_string<CharT,Traits,A>::size_type size_type;
- return my.replace(size_type(0), size_type(0), &c, &c + 1);
+ return my.replace(size_type(0), size_type(0), &c, &c + 1);
 }
 #endif
 

Modified: trunk/boost/interprocess/containers/vector.hpp
==============================================================================
--- trunk/boost/interprocess/containers/vector.hpp (original)
+++ trunk/boost/interprocess/containers/vector.hpp 2008-06-27 14:19:38 EDT (Fri, 27 Jun 2008)
@@ -1042,7 +1042,7 @@
       T *pos = detail::get_pointer(position.get_ptr());
       T *beg = detail::get_pointer(this->members_.m_start);
 
- std::copy(assign_move_it(pos + 1), assign_move_it(beg + this->members_.m_size), pos);
+ std::copy(assign_move_it(pos + 1), assign_move_it(beg + this->members_.m_size), pos);
       --this->members_.m_size;
       //Destroy last element
       base_t::destroy(detail::get_pointer(this->members_.m_start) + this->members_.m_size);
@@ -1056,12 +1056,12 @@
    //! <b>Complexity</b>: Linear to the distance between first and last.
    iterator erase(const_iterator first, const_iterator last)
    {
- if (first != last){ // worth doing, copy down over hole
+ if (first != last){ // worth doing, copy down over hole
          T* end_pos = detail::get_pointer(this->members_.m_start) + this->members_.m_size;
          T* ptr = detail::get_pointer(std::copy
             (assign_move_it(detail::get_pointer(last.get_ptr()))
             ,assign_move_it(end_pos)
- ,detail::get_pointer(first.get_ptr())
+ ,detail::get_pointer(first.get_ptr())
             ));
          size_type destroyed = (end_pos - ptr);
          this->destroy_n(ptr, destroyed);
@@ -1310,8 +1310,8 @@
       //Destroy and deallocate old elements
       //If there is allocated memory, destroy and deallocate
       if(this->members_.m_start != 0){
- if(!base_t::trivial_dctr_after_move)
- this->destroy_n(detail::get_pointer(this->members_.m_start), this->members_.m_size);
+ if(!base_t::trivial_dctr_after_move)
+ this->destroy_n(detail::get_pointer(this->members_.m_start), this->members_.m_size);
          this->alloc().deallocate(this->members_.m_start, this->members_.m_capacity);
       }
       this->members_.m_start = new_start;
@@ -1702,7 +1702,7 @@
          scoped_alloc.release();
          //Destroy and deallocate old buffer
          if(this->members_.m_start != 0){
- this->destroy_n(detail::get_pointer(this->members_.m_start), this->members_.m_size);
+ this->destroy_n(detail::get_pointer(this->members_.m_start), this->members_.m_size);
             this->alloc().deallocate(this->members_.m_start, this->members_.m_capacity);
          }
          this->members_.m_start = ret.first;

Modified: trunk/boost/interprocess/detail/algorithms.hpp
==============================================================================
--- trunk/boost/interprocess/detail/algorithms.hpp (original)
+++ trunk/boost/interprocess/detail/algorithms.hpp 2008-06-27 14:19:38 EDT (Fri, 27 Jun 2008)
@@ -121,7 +121,7 @@
 T *copy_n_dispatch(const T *first, typename std::iterator_traits<const T*>::difference_type length, T *dest, detail::bool_<true>)
 {
    std::size_t size = length*sizeof(T);
- return ((T*)std::memmove(dest, first, size)) + size;
+ return ((T*)std::memmove(dest, first, size)) + size;
 }
 
 template<class InIt, class OutIt> inline
@@ -165,7 +165,7 @@
 T *uninitialized_copy_n_dispatch(const T *first, typename std::iterator_traits<const T*>::difference_type length, T *dest, detail::bool_<true>)
 {
    std::size_t size = length*sizeof(T);
- return ((T*)std::memmove(dest, first, size)) + size;
+ return ((T*)std::memmove(dest, first, size)) + size;
 }
 
 template<class InIt, class FwdIt> inline

Modified: trunk/boost/interprocess/detail/config_begin.hpp
==============================================================================
--- trunk/boost/interprocess/detail/config_begin.hpp (original)
+++ trunk/boost/interprocess/detail/config_begin.hpp 2008-06-27 14:19:38 EDT (Fri, 27 Jun 2008)
@@ -1,3 +1,12 @@
+//////////////////////////////////////////////////////////////////////////////
+//
+// (C) Copyright Ion Gaztanaga 2005-2008. Distributed under the Boost
+// Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/interprocess for documentation.
+//
+//////////////////////////////////////////////////////////////////////////////
 #ifndef BOOST_INTERPROCESS_CONFIG_INCLUDED
 #define BOOST_INTERPROCESS_CONFIG_INCLUDED
 #include <boost/config.hpp>
@@ -15,20 +24,20 @@
    #pragma warning (disable : 4146) // unary minus operator applied to unsigned type, result still unsigned
    #pragma warning (disable : 4284) // odd return type for operator->
    #pragma warning (disable : 4244) // possible loss of data
- #pragma warning (disable : 4251) // 'identifier' : class 'type' needs to have dll-interface to be used by clients of class 'type2'
- #pragma warning (disable : 4267) // conversion from 'X' to 'Y', possible loss of data
- #pragma warning (disable : 4275) // non – DLL-interface classkey 'identifier' used as base for DLL-interface classkey 'identifier'
- #pragma warning (disable : 4355) // 'this' : used in base member initializer list
- #pragma warning (disable : 4503) // 'identifier' : decorated name length exceeded, name was truncated
+ #pragma warning (disable : 4251) // "identifier" : class "type" needs to have dll-interface to be used by clients of class "type2"
+ #pragma warning (disable : 4267) // conversion from "X" to "Y", possible loss of data
+ #pragma warning (disable : 4275) // non DLL-interface classkey "identifier" used as base for DLL-interface classkey "identifier"
+ #pragma warning (disable : 4355) // "this" : used in base member initializer list
+ #pragma warning (disable : 4503) // "identifier" : decorated name length exceeded, name was truncated
    #pragma warning (disable : 4511) // copy constructor could not be generated
    #pragma warning (disable : 4512) // assignment operator could not be generated
    #pragma warning (disable : 4514) // unreferenced inline removed
    #pragma warning (disable : 4521) // Disable "multiple copy constructors specified"
- #pragma warning (disable : 4522) // 'class' : multiple assignment operators specified
- #pragma warning (disable : 4675) // 'method' should be declared 'static' and have exactly one parameter
+ #pragma warning (disable : 4522) // "class" : multiple assignment operators specified
+ #pragma warning (disable : 4675) // "method" should be declared "static" and have exactly one parameter
    #pragma warning (disable : 4710) // function not inlined
    #pragma warning (disable : 4711) // function selected for automatic inline expansion
    #pragma warning (disable : 4786) // identifier truncated in debug info
- #pragma warning (disable : 4996) // 'function': was declared deprecated
+ #pragma warning (disable : 4996) // "function": was declared deprecated
    #pragma warning (disable : 4197) // top-level volatile in cast is ignored
 #endif

Modified: trunk/boost/interprocess/detail/config_end.hpp
==============================================================================
--- trunk/boost/interprocess/detail/config_end.hpp (original)
+++ trunk/boost/interprocess/detail/config_end.hpp 2008-06-27 14:19:38 EDT (Fri, 27 Jun 2008)
@@ -1,3 +1,12 @@
+//////////////////////////////////////////////////////////////////////////////
+//
+// (C) Copyright Ion Gaztanaga 2005-2008. Distributed under the Boost
+// Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/interprocess for documentation.
+//
+//////////////////////////////////////////////////////////////////////////////
 #if defined BOOST_MSVC
    #pragma warning (pop)
    #ifdef BOOST_INTERPROCESS_CRT_SECURE_NO_DEPRECATE

Modified: trunk/boost/interprocess/detail/math_functions.hpp
==============================================================================
--- trunk/boost/interprocess/detail/math_functions.hpp (original)
+++ trunk/boost/interprocess/detail/math_functions.hpp 2008-06-27 14:19:38 EDT (Fri, 27 Jun 2008)
@@ -97,7 +97,7 @@
    for(std::size_t shift = Bits >> 1; shift; shift >>= 1){
       std::size_t tmp = n >> shift;
       if (tmp)
- log2 += shift, n = tmp;
+ log2 += shift, n = tmp;
    }
 
    return log2;

Modified: trunk/boost/interprocess/smart_ptr/detail/sp_counted_base.hpp
==============================================================================
--- trunk/boost/interprocess/smart_ptr/detail/sp_counted_base.hpp (original)
+++ trunk/boost/interprocess/smart_ptr/detail/sp_counted_base.hpp 2008-06-27 14:19:38 EDT (Fri, 27 Jun 2008)
@@ -1,3 +1,14 @@
+//////////////////////////////////////////////////////////////////////////////
+//
+// (C) Copyright Ion Gaztanaga 2007-2008.
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/interprocess for documentation.
+//
+//////////////////////////////////////////////////////////////////////////////
 #ifndef BOOST_INTERPROCESS_DETAIL_SP_COUNTED_BASE_HPP_INCLUDED
 #define BOOST_INTERPROCESS_DETAIL_SP_COUNTED_BASE_HPP_INCLUDED
 

Deleted: trunk/boost/interprocess/sync/math_functions.hpp
==============================================================================
--- trunk/boost/interprocess/sync/math_functions.hpp 2008-06-27 14:19:38 EDT (Fri, 27 Jun 2008)
+++ (empty file)
@@ -1,110 +0,0 @@
-//////////////////////////////////////////////////////////////////////////////
-//
-// (C) Copyright Stephen Cleary 2000.
-// (C) Copyright Ion Gaztanaga 2007-2008.
-//
-// Distributed under the Boost Software License, Version 1.0.
-// (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-//
-// See http://www.boost.org/libs/interprocess for documentation.
-//
-// This file is a slightly modified file from Boost.Pool
-//
-//////////////////////////////////////////////////////////////////////////////
-
-#ifndef BOOST_INTERPROCESS_DETAIL_MATH_FUNCTIONS_HPP
-#define BOOST_INTERPROCESS_DETAIL_MATH_FUNCTIONS_HPP
-
-#include <boost/static_assert.hpp> //BOOST_STATIC_ASSERT
-#include <climits> //CHAR_BIT
-
-namespace boost {
-namespace interprocess {
-namespace detail {
-
-// Greatest common divisor and least common multiple
-
-//
-// gcd is an algorithm that calculates the greatest common divisor of two
-// integers, using Euclid's algorithm.
-//
-// Pre: A > 0 && B > 0
-// Recommended: A > B
-template <typename Integer>
-inline Integer gcd(Integer A, Integer B)
-{
- do
- {
- const Integer tmp(B);
- B = A % B;
- A = tmp;
- } while (B != 0);
-
- return A;
-}
-
-//
-// lcm is an algorithm that calculates the least common multiple of two
-// integers.
-//
-// Pre: A > 0 && B > 0
-// Recommended: A > B
-template <typename Integer>
-inline Integer lcm(const Integer & A, const Integer & B)
-{
- Integer ret = A;
- ret /= gcd(A, B);
- ret *= B;
- return ret;
-}
-
-template <typename Integer>
-inline Integer log2_ceil(const Integer & A)
-{
- Integer i = 0;
- Integer power_of_2 = 1;
-
- while(power_of_2 < A){
- power_of_2 <<= 1;
- ++i;
- }
- return i;
-}
-
-template <typename Integer>
-inline Integer upper_power_of_2(const Integer & A)
-{
- Integer power_of_2 = 1;
-
- while(power_of_2 < A){
- power_of_2 <<= 1;
- }
- return power_of_2;
-}
-
-//This function uses binary search to discover the
-//highest set bit of the integer
-inline std::size_t floor_log2 (std::size_t x)
-{
- const std::size_t Bits = sizeof(std::size_t)*CHAR_BIT;
- const bool Size_t_Bits_Power_2= !(Bits & (Bits-1));
- BOOST_STATIC_ASSERT(Size_t_Bits_Power_2);
-
- std::size_t n = x;
- std::size_t log2 = 0;
-
- for(std::size_t shift = Bits >> 1; shift; shift >>= 1){
- std::size_t tmp = n >> shift;
- if (tmp)
- log2 += shift, n = tmp;
- }
-
- return log2;
-}
-
-} // namespace detail
-} // namespace interprocess
-} // namespace boost
-
-#endif

Modified: trunk/boost/intrusive/detail/utilities.hpp
==============================================================================
--- trunk/boost/intrusive/detail/utilities.hpp (original)
+++ trunk/boost/intrusive/detail/utilities.hpp 2008-06-27 14:19:38 EDT (Fri, 27 Jun 2008)
@@ -506,7 +506,7 @@
    for(std::size_t shift = Bits >> 1; shift; shift >>= 1){
       std::size_t tmp = n >> shift;
       if (tmp)
- log2 += shift, n = tmp;
+ log2 += shift, n = tmp;
    }
 
    return log2;

Modified: trunk/boost/intrusive/slist.hpp
==============================================================================
--- trunk/boost/intrusive/slist.hpp (original)
+++ trunk/boost/intrusive/slist.hpp 2008-06-27 14:19:38 EDT (Fri, 27 Jun 2008)
@@ -1653,7 +1653,7 @@
    private:
    void priv_splice_after(node_ptr prev_pos_n, slist_impl &x, node_ptr before_first_n, node_ptr before_last_n)
    {
- if (before_first_n != before_last_n && prev_pos_n != before_first_n && prev_pos_n != before_last_n)
+ if (before_first_n != before_last_n && prev_pos_n != before_first_n && prev_pos_n != before_last_n)
       {
          if(cache_last){
             if(node_traits::get_next(prev_pos_n) == this->get_end_node()){


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