OGRECave / scape

Scape terrain editor

Home Page:http://www.decarpentier.nl/downloads/ScapeDocs/UserGuide.html

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Organize header includes

kPYKx7Ddw4n1aIKZ opened this issue · comments

In some places header includes are missing. (#include)
One can also break the build by changing the order of the header includes.
Moreover, the build doesn't work well on some systems.

I'm not really sure how one would do that.
One could move the header includes with template types (I think those were the ones that were difficult to build) in the right order in some common header file.
Maybe the forward declarations could be moved into this header, too.
One could maybe do it similar to that: OgrePrerequisites.h

Is this the right/most conventional way?

as always there is no single right way in c++. However most projects moved to the single large header approach - call it prerequisites.h, Scape.h or PCH.h. It easily integrates with the pre-compiled header mechanism and allows shuffling stuff around without breaking code.