Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r72135 - in sandbox/block_ptr/boost: . detail
From: phil_at_[hidden]
Date: 2011-05-24 17:41:58


Author: pbouchard
Date: 2011-05-24 17:41:58 EDT (Tue, 24 May 2011)
New Revision: 72135
URL: http://svn.boost.org/trac/boost/changeset/72135

Log:
* Renamed get_ to static_
Text files modified:
   sandbox/block_ptr/boost/block_ptr.hpp | 14 +++++++-------
   sandbox/block_ptr/boost/detail/block_base.hpp | 22 +++++++++++-----------
   2 files changed, 18 insertions(+), 18 deletions(-)

Modified: sandbox/block_ptr/boost/block_ptr.hpp
==============================================================================
--- sandbox/block_ptr/boost/block_ptr.hpp (original)
+++ sandbox/block_ptr/boost/block_ptr.hpp 2011-05-24 17:41:58 EDT (Tue, 24 May 2011)
@@ -74,7 +74,7 @@
     intrusive_list includes_; /**< List of all sets of an union. */
     intrusive_list elements_; /**< List of all pointee objects belonging to a @c block_header . */
 
- static mutex & get_mutex()
+ static mutex & static_mutex()
         {
                 static mutex mutex_;
                 
@@ -86,7 +86,7 @@
                 Pool where all sets are allocated.
         */
         
- static fast_pool_allocator<block_header> & get_pool()
+ static fast_pool_allocator<block_header> & static_pool()
         {
             static fast_pool_allocator<block_header> pool_;
             
@@ -177,7 +177,7 @@
         
     void * operator new (size_t s)
     {
- return get_pool().allocate(s);
+ return static_pool().allocate(s);
     }
     
         
@@ -203,7 +203,7 @@
         
     void operator delete (void * p)
     {
- get_pool().deallocate(static_cast<block_header *>(p), sizeof(block_header));
+ static_pool().deallocate(static_cast<block_header *>(p), sizeof(block_header));
     }
 };
 
@@ -282,7 +282,7 @@
             block_ptr & operator = (block<V> * p)
             {
 #ifndef BOOST_DISABLE_THREADS
- mutex::scoped_lock scoped_lock(block_header::get_mutex());
+ mutex::scoped_lock scoped_lock(block_header::static_mutex());
 #endif
 
                 release(false);
@@ -368,7 +368,7 @@
             block_ptr & operator = (block_ptr<V> const & p)
             {
 #ifndef BOOST_DISABLE_THREADS
- mutex::scoped_lock scoped_lock(block_header::get_mutex());
+ mutex::scoped_lock scoped_lock(block_header::static_mutex());
 #endif
 
                 if (ps_->redir() != p.ps_->redir())
@@ -397,7 +397,7 @@
         void reset()
         {
 #ifndef BOOST_DISABLE_THREADS
- mutex::scoped_lock scoped_lock(block_header::get_mutex());
+ mutex::scoped_lock scoped_lock(block_header::static_mutex());
 #endif
 
             release(false);

Modified: sandbox/block_ptr/boost/detail/block_base.hpp
==============================================================================
--- sandbox/block_ptr/boost/detail/block_base.hpp (original)
+++ sandbox/block_ptr/boost/detail/block_base.hpp 2011-05-24 17:41:58 EDT (Tue, 24 May 2011)
@@ -72,14 +72,14 @@
         typedef std::list< numeric::interval<long>, fast_pool_allocator< numeric::interval<long> > > pool_lii; /**< Syntax helper. */
 
 #ifndef BOOST_DISABLE_THREADS
- static thread_specific_ptr<pool_lii> & get_plii() /**< Thread specific list of memory boundaries. */
+ static thread_specific_ptr<pool_lii> & static_plii() /**< Thread specific list of memory boundaries. */
     {
             static thread_specific_ptr<pool_lii> plii_;
             
             return plii_;
     }
 #else
- static std::auto_ptr<pool_lii> & get_plii() /**< List of memory boundaries. */
+ static std::auto_ptr<pool_lii> & static_plii() /**< List of memory boundaries. */
     {
             static std::auto_ptr<pool_lii> plii_;
             
@@ -101,8 +101,8 @@
         
         static void init()
         {
- if (get_plii().get() == 0)
- get_plii().reset(new pool_lii());
+ if (static_plii().get() == 0)
+ static_plii().reset(new pool_lii());
         }
         
         /**
@@ -118,13 +118,13 @@
             
         pool_lii::reverse_iterator i;
         
- for (i = get_plii()->rbegin(); i != get_plii()->rend(); i ++)
+ for (i = static_plii()->rbegin(); i != static_plii()->rend(); i ++)
             if (in((long)(p), * i))
                 break;
 
- get_plii()->erase(i.base(), get_plii()->end());
+ static_plii()->erase(i.base(), static_plii()->end());
         
- return (block_base *)(get_plii()->rbegin()->lower());
+ return (block_base *)(static_plii()->rbegin()->lower());
     }
     
         
@@ -141,7 +141,7 @@
             
         void * p = pool_t::ordered_malloc(s);
         
- get_plii()->push_back(numeric::interval<long>((long) p, long((char *)(p) + s)));
+ static_plii()->push_back(numeric::interval<long>((long) p, long((char *)(p) + s)));
         
         return p;
     }
@@ -160,11 +160,11 @@
             
         pool_lii::reverse_iterator i;
         
- for (i = get_plii()->rbegin(); i != get_plii()->rend(); i ++)
+ for (i = static_plii()->rbegin(); i != static_plii()->rend(); i ++)
             if (in((long)(p), * i))
                 break;
 
- get_plii()->erase(i.base(), get_plii()->end());
+ static_plii()->erase(i.base(), static_plii()->end());
         pool_t::ordered_free(p, s);
     }
 };
@@ -308,7 +308,7 @@
         virtual ~block() {}
         virtual void dispose() {}
 
- virtual void * get_deleter( std::type_info const & ti ) { return 0; }
+ virtual void * static_deleter( std::type_info const & ti ) { return 0; }
 
     public:
                 /**


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