write function, should use at/near construction
| 206 | |
| 207 | // write function, should use at/near construction |
| 208 | void input_buffer::assign(const byte* t, uint s) |
| 209 | { |
| 210 | if (t && error_ == 0 && check(current_, get_capacity()) == 0) { |
| 211 | add_size(s); |
| 212 | if (error_ == 0) { |
| 213 | memcpy(&buffer_[current_], t, s); |
| 214 | return; // success |
| 215 | } |
| 216 | } |
| 217 | |
| 218 | error_ = -1; |
| 219 | } |
| 220 | |
| 221 | |
| 222 | // use read to query input, adjusts current |
no outgoing calls
no test coverage detected