dillo-browser / dillo

Dillo, a multi-platform graphical web browser
https://dillo-browser.github.io/
GNU General Public License v3.0
555 stars 28 forks source link

Make headers self-contained #183

Open rodarima opened 4 months ago

rodarima commented 4 months ago

In the current state of the implementation, headers are not self-contained. That is, when a header is included it may not include itself some other required headers, assuming the caller would have included it.

There shouldn't be any prior dependency on any other header, so they can be easily changed and moved around. This also helps identify dependencies among code.

This tool can help: https://include-what-you-use.org/

kalvdans commented 4 months ago

It's a common practise for foo.cc to include foo.hh as its first include. That way, the compilation will test that the header is self-containing. Would you accept a pull request that changes all source files to include "their" header file first?