| 3912 | |
| 3913 | template <size_t Bytes> |
| 3914 | FORY_ALWAYS_INLINE bool ensure_offset_readable(Buffer &buffer, uint32_t offset, |
| 3915 | Error &error) { |
| 3916 | static_assert(Bytes > 0, "Bytes must be positive"); |
| 3917 | if (FORY_PREDICT_FALSE(offset > buffer.size() || |
| 3918 | buffer.size() - offset < Bytes)) { |
| 3919 | error.set_buffer_out_of_bound(offset, Bytes, buffer.size()); |
| 3920 | return false; |
| 3921 | } |
| 3922 | return true; |
| 3923 | } |
| 3924 | |
| 3925 | FORY_ALWAYS_INLINE uint64_t read_tagged_uint64_at_checked(Buffer &buffer, |
| 3926 | uint32_t &offset, |
nothing calls this directly
no test coverage detected