Checks to see if idx is within global array bounds array bounds are between 0 and itemCount + #deleted indices e.g. [3, 7, 2, D, 1, D, 5] where itemCount = 5 and #deleted indices is 2 and so it is valid to query the array with idx 6.
| 58 | // e.g. [3, 7, 2, D, 1, D, 5] where itemCount = 5 and #deleted indices is 2 |
| 59 | // and so it is valid to query the array with idx 6. |
| 60 | static inline bool _DataBlock_IndexOutOfBounds |
| 61 | ( |
| 62 | const DataBlock *dataBlock, |
| 63 | uint64_t idx |
| 64 | ) { |
| 65 | return (idx >= (dataBlock->itemCount + array_len(dataBlock->deletedIdx))); |
| 66 | } |
| 67 | |
| 68 | DataBlockItemHeader *DataBlock_GetItemHeader |
| 69 | ( |
no test coverage detected