* Runs the specified function for every single byte in the DynamicBuffer. * * @param func Function to run for every byte. */
| 199 | * @param func Function to run for every byte. |
| 200 | */ |
| 201 | void DynamicBuffer::forEach(const std::function<void(uint8_t&)>& func) |
| 202 | { |
| 203 | for (uint8_t& byte : _data) |
| 204 | func(byte); |
| 205 | } |
| 206 | |
| 207 | /** |
| 208 | * Runs the specified function for every single byte in the DynamicBuffer |
no outgoing calls