Check if a our position is within bounds. * The position is passed as a parameter to avoid recalculating it. */
| 2349 | /* Check if a our position is within bounds. |
| 2350 | * The position is passed as a parameter to avoid recalculating it. */ |
| 2351 | bool position_is_within_bounds() |
| 2352 | { |
| 2353 | if (!offset) |
| 2354 | return !position_cursor.is_outside_computation_bounds(); |
| 2355 | |
| 2356 | if (overflowed) |
| 2357 | return false; |
| 2358 | |
| 2359 | /* No valid bound to compare to. */ |
| 2360 | if (position_cursor.is_outside_computation_bounds() || |
| 2361 | top_bound->is_outside_computation_bounds() || |
| 2362 | bottom_bound->is_outside_computation_bounds()) |
| 2363 | return false; |
| 2364 | |
| 2365 | /* We are over the bound. */ |
| 2366 | if (position < top_bound->get_curr_rownum()) |
| 2367 | return false; |
| 2368 | if (position > bottom_bound->get_curr_rownum()) |
| 2369 | return false; |
| 2370 | |
| 2371 | return true; |
| 2372 | } |
| 2373 | |
| 2374 | /* Get the current position, accounting for the offset value, if present. |
| 2375 | NOTE: This function does not check over/underflow. |
nothing calls this directly
no test coverage detected