| 167 | } |
| 168 | |
| 169 | Serializer::ScopedAlignmentContext::ScopedAlignmentContext(Serializer& ser, size_t min_read) |
| 170 | : ser_(ser) |
| 171 | , max_align_(ser.encoding().max_align()) |
| 172 | , start_rpos_(ser.rpos()) |
| 173 | , rblock_((max_align_ && ser.current_) ? (reinterpret_cast<size_t>(ser.current_->rd_ptr()) - ser.align_rshift_) % max_align_ : 0) |
| 174 | , min_read_(min_read) |
| 175 | , start_wpos_(ser.wpos()) |
| 176 | , wblock_((max_align_ && ser.current_) ? (reinterpret_cast<size_t>(ser.current_->wr_ptr()) - ser.align_wshift_) % max_align_ : 0) |
| 177 | { |
| 178 | ser_.reset_alignment(); |
| 179 | } |
| 180 | |
| 181 | void |
| 182 | Serializer::ScopedAlignmentContext::restore(Serializer& ser) const |
nothing calls this directly
no test coverage detected