| 69 | } |
| 70 | |
| 71 | inline uint8_t* BitWriter::GetNextBytePtr(int num_bytes) { |
| 72 | Flush(/* align */ true); |
| 73 | DCHECK_LE(byte_offset_, max_bytes_); |
| 74 | if (byte_offset_ + num_bytes > max_bytes_) return NULL; |
| 75 | uint8_t* ptr = buffer_ + byte_offset_; |
| 76 | byte_offset_ += num_bytes; |
| 77 | return ptr; |
| 78 | } |
| 79 | |
| 80 | template<typename T> |
| 81 | inline bool BitWriter::PutAligned(T val, int num_bytes) { |
no outgoing calls
no test coverage detected