3 ms·
// Lets discuss how Windows is a flaming pile of poo. I'm now casting the header // directly into the structure, because its the one I want, and this is just
by jsheard 2y ago
// Lets discuss how Windows is a flaming pile of poo. I'm now casting the header
// directly into the structure, because its the one I want, and this is just how
// its done. I hate Windows. - jkmcd
https://github.com/electronicarts/CnC_Generals_Zero_Hour/blob/main/Generals/Code/Main/WinMain.cpp#L615 https://github.com/electronicarts/CnC_Generals_Zero_Hour/blo...
- poizan42 2y ago... because they just casted lParam into a pointer to DEV_BROADCAST_HDR a few lines above, which is the common part of the different structure it could point to. That's just doing inheritance the C way. What did they expect? A C++ class from a C api?
- IntelMiner 2y agoGenerals was famously extremely rushed in development. Probably a novice programmer