I have source that has been around for 10 years old in C++. It works on OS X, Linux and Windows well. It is a static Library of API calls other developers might need to use.
Over time, previous programmers have sort of not kept it tidy.
So my question:
There are several headers that most sources use. I could put them all in a single header and update the source files to use that instead of them all including each one every time. Wise move?
Second, would it be wise to include all the DEFINEs in header and just include that versus a few defines in each header?
Third, if I do a single header that has all the .h's that are common every time, can I then put things like #pragma once and not have to do it in each header as well.
Fourth, same would apply for all the times we call if (Mac) #include just put in in the one header and include that one header where needed versus each header calling Carbon.h
I hope that my organization/optimization questions make sense. I would like to better understand optimizing...