mirror of
https://github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator.git
synced 2024-11-27 00:44:35 +00:00
Merge branch 'master' of https://github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator into master
This commit is contained in:
commit
8cd86b6dd4
@ -4749,7 +4749,7 @@ static IterT VmaBinaryFindFirstNotLess(IterT beg, IterT end, const KeyT &key, co
|
|||||||
size_t down = 0, up = (end - beg);
|
size_t down = 0, up = (end - beg);
|
||||||
while(down < up)
|
while(down < up)
|
||||||
{
|
{
|
||||||
const size_t mid = (down + up) / 2;
|
const size_t mid = down + (up - down) / 2; // Overflow-safe midpoint calculation
|
||||||
if(cmp(*(beg+mid), key))
|
if(cmp(*(beg+mid), key))
|
||||||
{
|
{
|
||||||
down = mid + 1;
|
down = mid + 1;
|
||||||
|
Loading…
Reference in New Issue
Block a user