2 ms·
Seems like you could avoid that potential for error by making functions that modify an SDS take &foo rather than just foo, and modify it in place. As a stopgap
by JoshTriplett 11y ago
Seems like you could avoid that potential for error by making functions that modify an SDS take &foo rather than just foo, and modify it in place.
As a stopgap, though, SDS could use GCC's attribute "warn_unused_result" on all of those return values.
- jzwinck 11y agoLast time I tried it, that GCC attribute was only implemented for C, not C++. It seems like a good idea anyway.