Ticket #7322: freelist.hpp.patch
File freelist.hpp.patch, 1.3 KB (added by , 10 years ago) |
---|
-
boost/lockfree/detail/freelist.hpp
381 382 #ifdef BOOST_LOCKFREE_FREELIST_INIT_RUNS_DTOR 382 383 destruct<false>(nodes + i); 383 384 #else 384 deallocate<false>( i);385 deallocate<false>(static_cast<index_t>(i)); 385 386 #endif 386 387 } 387 388 } … … 391 392 392 393 template <typename Allocator> 393 394 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)) 395 397 { 396 398 initialize(); 397 399 } … … 461 463 462 464 index_t null_handle(void) const 463 465 { 464 return NodeStorage::node_count();466 return static_cast<index_t>(NodeStorage::node_count()); 465 467 } 466 468 467 469 index_t get_handle(T * pointer) const … … 469 471 if (pointer == NULL) 470 472 return null_handle(); 471 473 else 472 return pointer - NodeStorage::nodes();474 return static_cast<index_t>(pointer - NodeStorage::nodes()); 473 475 } 474 476 475 477 index_t get_handle(tagged_node_handle const & handle) const