\brief Like SliceBuffer, but construct a mutable buffer slice. If the parent buffer is not mutable, behavior is undefined (it may abort in debug builds).
| 485 | /// If the parent buffer is not mutable, behavior is undefined (it may abort |
| 486 | /// in debug builds). |
| 487 | static inline std::shared_ptr<Buffer> SliceMutableBuffer(std::shared_ptr<Buffer> buffer, |
| 488 | const int64_t offset) { |
| 489 | int64_t length = buffer->size() - offset; |
| 490 | return SliceMutableBuffer(std::move(buffer), offset, length); |
| 491 | } |
| 492 | |
| 493 | /// \brief Input-checking version of SliceMutableBuffer |
| 494 | /// |