Clean up includes in MainWindow and remove duplicate helper#1955
Conversation
add back renderer.h because it is actually used in metal builds
Relying on cascaded headers is acceptable within reason I would say. For example getting TitleInfo via including TitleList seems pretty obvious to me. CafeSystem from MainWindow.h is a little less obvious but still ok. But for example indirectly pulling in utility headers via some of the unrelated main headers would be questionable (although no doubt we are doing this by accident already in some places). Basically we want to avoid making the include structure too brittle, where optimizing an include away from some header breaks the build in a completely different and mostly unrelated place. There is also the concern of build times, where having less cascaded includes in headers is better. |
That is what led me down this track. Excluding precompiled.h MainWindow.cpp expands to ~16MiB of source code after preprocessing. |
Here is a good overview of the differences in MainWindow.cpp

CafeSystem is included from MainWindow.h, likewise for LoggingWindow.h
TitleInfo is included from TitleList, which is already included.
If relying on cascading includes like this is undesired I can add them back.
As far as I can tell the following were entirely unused in MainWindow.cpp:
I've also removed the duplicate to_underlying in favor of the new one in precompiled.h