Ah, I think you've been mislead by the whitespace change above.
stream_associated_buffers.erase(current) is called in release_buffer(). The new stream_associated_buffers.erase(associated_range.first, associated_range.second) call is in release_buffer_stream.
This could indeed be replaced by a stream_associated_buffers.erase(stream_id).
Ah, I think you've been mislead by the whitespace change above.
stream_ associated_ buffers. erase(current) is called in release_buffer(). The new stream_ associated_ buffers. erase(associate d_range. first, associated_ range.second) call is in release_ buffer_ stream.
This could indeed be replaced by a stream_ associated_ buffers. erase(stream_ id).