HomeWildfire Games

Fix build without precompiled headers.

Description

Fix build without precompiled headers.

Refs r20167.

Event Timeline

elexis added a subscriber: elexis.Aug 22 2018, 4:34 PM
elexis added inline comments.
/ps/trunk/source/network/scripting/JSInterface_Network.cpp
30

Due to the ifdef macro, this removal doesn't make the code really faster to compile.
Shortening the code and relying on the reader accounting for the indirection seems to make it rather more than less timeconsuming to test for completeness of all includes.
Now the reader has to test that the header file does not use forward declarations but actual includes.
If that trick were suggested for more than the header file of the cpp file, then in order to test the correctness of one file, he has to recursively test the correctness of included files.
If it should be a pattern that these specific includes are to be excluded from cpp files, there is also the effort to ensure that the include is absent. Otherwise you get inconsistencies that are also confusing and misleading.
Keep it smart and simple - each file includes everything that it needs and no more.
-> Don't remove this IMO