[vlc-devel] [RFC 3/3] vlc_arrays: append items in amortized O(1)

Filip Roséen filip at atch.se
Fri Jul 20 11:39:07 CEST 2018



On 2018-07-20 11:36, Filip Roséen wrote:

> > I could, but I didn't do it because their failure would be triggered by
> > the following asserts anyway (e.g. if append() fails, count() will be
> > incorrect). And it would just add explicit assertions about
> > out-of-memory.
> 
> We have other tests using `asserts` in some places, and tests that
> even `assert` that memory-allocation succeeds. The reason is precisely
> as you pointed out: if *append* fails, *count* will be flagged as the
> culprit.

Supposed to be *"in such cases"*, not *"some"*.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20180720/f7444d6e/attachment.html>


More information about the vlc-devel mailing list