mirror of
https://github.com/Ed94/raddebugger.git
synced 2026-11-16 19:20:13 -08:00
remove dead binary searching helper
This commit is contained in:
1 parent
092a121484
commit
e28a543573
2 files changed
-37
No files matched your search
@@ -659,39 +659,6 @@ wrapped_read(U8 *ring_base, U64 ring_size, U64 ring_pos, void *dst_data, U64 rea
|
||||
|
||||
////////////////////////////////
|
||||
|
||||
internal U64
|
||||
u64_array_bsearch(U64 *arr, U64 count, U64 value)
|
||||
{
|
||||
if(count > 1 && arr[0] <= value && value < arr[count-1])
|
||||
{
|
||||
U64 l = 0;
|
||||
U64 r = count - 1;
|
||||
for(; l <= r; )
|
||||
{
|
||||
U64 m = l + (r - l) / 2;
|
||||
if(arr[m] == value)
|
||||
{
|
||||
return m;
|
||||
}
|
||||
else if(arr[m] < value)
|
||||
{
|
||||
l = m + 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
r = m - 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (count == 1 && arr[0] == value)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
return max_U64;
|
||||
}
|
||||
|
||||
////////////////////////////////
|
||||
|
||||
internal U32
|
||||
idx_of_zero_byte64(U8 *ptr, U64 size)
|
||||
{
|
||||
|
||||
@@ -1123,10 +1123,6 @@ internal U64 wrapped_read(U8 *ring_base, U64 ring_size, U64 ring_pos, void *dst_
|
||||
|
||||
////////////////////////////////
|
||||
|
||||
internal U64 u64_array_bsearch(U64 *arr, U64 count, U64 value);
|
||||
|
||||
////////////////////////////////
|
||||
|
||||
internal U32 idx_of_zero_byte64(U8 *ptr, U64 size); // size must be exactly 8 bytes
|
||||
internal U64 index_of_zero_u32(U32 *ptr, U64 count);
|
||||
internal U64 index_of_zero_u64(U64 *ptr, U64 count);
|
||||
|
||||
Reference in new issue
Block a user