Ticket #7322: freelist.hpp.patch

File freelist.hpp.patch, 1.3 KB (added by Hartmut Kaiser, 10 years ago)
  • boost/lockfree/detail/freelist.hpp

     
    381382#ifdef BOOST_LOCKFREE_FREELIST_INIT_RUNS_DTOR
    382383            destruct<false>(nodes + i);
    383384#else
    384             deallocate<false>(i);
     385            deallocate<false>(static_cast<index_t>(i));
    385386#endif
    386387        }
    387388    }
     
    391392
    392393    template <typename Allocator>
    393394    fixed_size_freelist (Allocator const & alloc, std::size_t count):
    394         NodeStorage(alloc, count), pool_(tagged_index(count, 0))
     395        NodeStorage(alloc, count),
     396        pool_(tagged_index(static_cast<index_t>(count), 0))
    395397    {
    396398        initialize();
    397399    }
     
    461463
    462464    index_t null_handle(void) const
    463465    {
    464         return NodeStorage::node_count();
     466        return static_cast<index_t>(NodeStorage::node_count());
    465467    }
    466468
    467469    index_t get_handle(T * pointer) const
     
    469471        if (pointer == NULL)
    470472            return null_handle();
    471473        else
    472             return pointer - NodeStorage::nodes();
     474            return static_cast<index_t>(pointer - NodeStorage::nodes());
    473475    }
    474476
    475477    index_t get_handle(tagged_node_handle const & handle) const