pool: avoid unsigned/signed type conversion warnings
This commit is contained in:
parent
c718c9bff4
commit
6fba251a38
@ -51,13 +51,13 @@ void
|
|||||||
check_keep_value (cruft::TAP::logger &tap)
|
check_keep_value (cruft::TAP::logger &tap)
|
||||||
{
|
{
|
||||||
// Ensure that items keep their values.
|
// Ensure that items keep their values.
|
||||||
cruft::pool<uint64_t> uintpool(256);
|
cruft::pool<std::size_t> uintpool(256);
|
||||||
std::vector<uint64_t*> uintvector;
|
std::vector<std::size_t*> uintvector;
|
||||||
uintvector.reserve(uintpool.capacity ());
|
uintvector.reserve(uintpool.capacity ());
|
||||||
|
|
||||||
// Give every item a unique value
|
// Give every item a unique value
|
||||||
for (unsigned int i = 0; i < uintpool.capacity (); ++i) {
|
for (std::size_t i = 0; i < uintpool.capacity (); ++i) {
|
||||||
uint64_t *item = uintpool.allocate ();
|
std::size_t *item = uintpool.allocate ();
|
||||||
*item = i;
|
*item = i;
|
||||||
|
|
||||||
uintvector.push_back(item);
|
uintvector.push_back(item);
|
||||||
|
Loading…
Reference in New Issue
Block a user