Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r80363 - trunk/boost/lockfree
From: tim_at_[hidden]
Date: 2012-09-02 08:43:03


Author: timblechmann
Date: 2012-09-02 08:43:03 EDT (Sun, 02 Sep 2012)
New Revision: 80363
URL: http://svn.boost.org/trac/boost/changeset/80363

Log:
lockfree: cleanup member constructors

Signed-off-by: Tim Blechmann <tim_at_[hidden]>
Text files modified:
   trunk/boost/lockfree/queue.hpp | 6 +++---
   trunk/boost/lockfree/stack.hpp | 6 +++---
   2 files changed, 6 insertions(+), 6 deletions(-)

Modified: trunk/boost/lockfree/queue.hpp
==============================================================================
--- trunk/boost/lockfree/queue.hpp (original)
+++ trunk/boost/lockfree/queue.hpp 2012-09-02 08:43:03 EDT (Sun, 02 Sep 2012)
@@ -150,7 +150,7 @@
     queue(void):
         head_(tagged_node_handle(0, 0)),
         tail_(tagged_node_handle(0, 0)),
- pool(node_allocator(), has_capacity ? capacity : 0)
+ pool(node_allocator(), capacity)
     {
         BOOST_STATIC_ASSERT(has_capacity);
         initialize();
@@ -160,7 +160,7 @@
     explicit queue(typename node_allocator::template rebind<U>::other const & alloc):
         head_(tagged_node_handle(0, 0)),
         tail_(tagged_node_handle(0, 0)),
- pool(alloc, has_capacity ? capacity : 0)
+ pool(alloc, capacity)
     {
         BOOST_STATIC_ASSERT(has_capacity);
         initialize();
@@ -169,7 +169,7 @@
     explicit queue(allocator const & alloc):
         head_(tagged_node_handle(0, 0)),
         tail_(tagged_node_handle(0, 0)),
- pool(alloc, has_capacity ? capacity : 0)
+ pool(alloc, capacity)
     {
         BOOST_STATIC_ASSERT(has_capacity);
         initialize();

Modified: trunk/boost/lockfree/stack.hpp
==============================================================================
--- trunk/boost/lockfree/stack.hpp (original)
+++ trunk/boost/lockfree/stack.hpp 2012-09-02 08:43:03 EDT (Sun, 02 Sep 2012)
@@ -129,7 +129,7 @@
     //! Construct stack
     // @{
     stack(void):
- pool(node_allocator(), has_capacity ? capacity : 0)
+ pool(node_allocator(), capacity)
     {
         BOOST_STATIC_ASSERT(has_capacity);
         initialize();
@@ -137,14 +137,14 @@
 
     template <typename U>
     explicit stack(typename node_allocator::template rebind<U>::other const & alloc):
- pool(alloc, has_capacity ? capacity : 0)
+ pool(alloc, capacity)
     {
         BOOST_STATIC_ASSERT(has_capacity);
         initialize();
     }
 
     explicit stack(allocator const & alloc):
- pool(alloc, has_capacity ? capacity : 0)
+ pool(alloc, capacity)
     {
         BOOST_STATIC_ASSERT(has_capacity);
         initialize();


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