[vlc-devel] [RFC 3/3] vlc_arrays: append items in amortized O(1)
filip at atch.se
Fri Jul 20 23:11:19 CEST 2018
On 2018-07-20 13:54, Steve Lhomme wrote:
> I disagree. VLC_Exxx and VLC_SUCCESS are for functions and even VLC_API functions that
> return an int.
It was a note related to the entire patch, that happened to appear at
a function where `-1` does not denote error. I understand that you
might interpret what I wrote as if I am saying that `vlc_array_find`
should use *error-codes*, but honestly I thought you'd know be better
than that. `;-)`
Though, it was not entire clear from what I was writing so for that I
> Here we return an invalid array index which may have its own define but is not an error
> code. But maybe I misread because the -1 is not even from this commit.
It was unfortunate that I wrote it under the function that is supposed
to find the index of an item; I do agree that `vlc_array_find` not
finding an element is not an error, and for what it is worth me and
Romain spoke about this on *IRC*.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the vlc-devel