Diagnostic.h needs common.h for its types.
common.h only includes Diagnostics.h to make its functions available to any file that includes it.
AFAIK diagnostics.h can be superseeded by Guard.hpp completely. Guard.hpp doesn't need the types from common.h, so including it in common.h at the top is an option, though it includes additional standard headers.
Maybe the best option is to just remove the include from common.h alltogether, and include Guard.hpp where ever it is needed.
diagnostics.h contains the log_warning macros and all, which Guard.hpp does not replace. I suppose Console.hpp does, to some extent, but I don't think we're ready to outright drop it yet.
common.h only includes Diagnostics.h to make its functions available to any file that includes it.
Well, that's the responsibility if the individual files. Don't make everyone get a kitchen sink just because some files forget to.
If we change this one line:
https://github.com/OpenRCT2/OpenRCT2/blob/7373987f0a6b74f50fca35e0fb3c92da80ed8ea0/src/openrct2/Diagnostic.h#L81
diagnostics.h may longer need common.h for its types (sint32 here).
Well, that's the responsibility if the individual files. Don't make everyone get a kitchen sink just because some files forget to.
It's terribly convenient to have the log functions available at all times, though... I can see why it was done.
With OpenLoco I avoided having a common.h. If we want to do that we will need to change to using the _t types (from cstdint)
Most helpful comment
With OpenLoco I avoided having a common.h. If we want to do that we will need to change to using the
_ttypes (fromcstdint)