Minor code review
This commit is contained in:
Родитель
6362556e30
Коммит
186a8299b0
|
@ -242,7 +242,9 @@ namespace
|
|||
}
|
||||
else
|
||||
{
|
||||
std::unique_ptr<uint32_t[]> xorder(new uint32_t[nVerts]);
|
||||
std::unique_ptr<uint32_t[]> xorder(new (std::nothrow) uint32_t[nVerts]);
|
||||
if (!xorder)
|
||||
return E_OUTOFMEMORY;
|
||||
|
||||
// order in descending order
|
||||
MakeXHeap(xorder.get(), positions, nVerts);
|
||||
|
|
|
@ -459,7 +459,10 @@ namespace
|
|||
|
||||
size_t misses = 0;
|
||||
|
||||
std::unique_ptr<uint32_t[]> fifo(new uint32_t[cacheSize]);
|
||||
std::unique_ptr<uint32_t[]> fifo(new (std::nothrow) uint32_t[cacheSize]);
|
||||
if (!fifo)
|
||||
return;
|
||||
|
||||
size_t tail = 0;
|
||||
|
||||
memset(fifo.get(), 0xff, sizeof(uint32_t) * cacheSize);
|
||||
|
|
Загрузка…
Ссылка в новой задаче