Romain Vimont
|
af15c72f9c
|
Cleanup includes
Improved manually with the help of neovim LSP warnings and iwyu:
iwyu -Ibuilddir/app/ -Iapp/src/ app/src/XXX.c
|
2024-12-23 12:19:47 +01:00 |
|
Romain Vimont
|
c735b8c127
|
Use reallocarray() in sc_vector
This fails safely in case of overflow.
|
2023-03-10 22:22:15 +01:00 |
|
Romain Vimont
|
cb46e4a64a
|
Add missing include <string.h> for memmove()
|
2022-10-19 15:13:55 +02:00 |
|
Romain Vimont
|
71ef5cc0a9
|
Add missing include for vector
Include stdlib.h for realloc().
|
2022-02-22 21:00:43 +01:00 |
|
Romain Vimont
|
c070723bc8
|
Add sc_vector
Adapt vlc_vector [1], that I initially wrote while implementing the VLC
playlist [2].
Change the implementation to use "statement expressions" [3], which are
forbidden in VLC because "non-standard", but:
- they are supported by gcc and clang;
- they are already used in the scrcpy codebase;
- they avoid implementation hacks (VLC_VECTOR_FAILFLAG_);
- they allow a better API (sc_vector_index_of() may return the result
without an output parameter).
PR #3035 <https://github.com/Genymobile/scrcpy/pull/3035>
[1]: 0857947aba/include/vlc_vector.h
[2]: https://blog.rom1v.com/2019/05/a-new-core-playlist-for-vlc-4
[3]: https://gcc.gnu.org/onlinedocs/gcc/Statement-Exprs.html
|
2022-02-20 23:59:35 +01:00 |
|