in resolution of [Wsign-compare] warning id 9
Static cast `int index` for the sake of the single `size_t` to `int` comparison on line 116.
This commit is contained in:
parent
4f0fc47dd2
commit
251db72cfc
@ -113,7 +113,7 @@ SubAllocator* AllocatorFactoryRegistry::GetSubAllocator(int numa_node) {
|
||||
CHECK_LE(numa_node, port::NUMANumNodes());
|
||||
index = 1 + numa_node;
|
||||
}
|
||||
if (best_entry->sub_allocators.size() < (index + 1)) {
|
||||
if (best_entry->sub_allocators.size() < static_cast<size_t>(index + 1)) {
|
||||
best_entry->sub_allocators.resize(index + 1);
|
||||
}
|
||||
if (!best_entry->sub_allocators[index].get()) {
|
||||
|
Loading…
Reference in New Issue
Block a user