fabiensanglard / dc

Driving Compilers

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

engine.cc includes engine.h three times, not two

denilsonsa opened this issue · comments

In cpp.php, section Header guards, we have engine.cc including all three header files: engine.h, render.h and ai.h. But the last two header files also include engine.h. This means this base header is included THREE times, not two.

Thus, we have a lot of things to fix:

  • The output from clang, the error message should be different.
  • The TU from engine.cc, the struct World should be listed three times.
  • The paragraph text, as the paragraph assumes it's included two times instead of three.

Alternatively, a smaller solution is to:

  • Remove #include "engine.h" from engine.cc
  • Slightly fix the paragraph text.
commented

Fixed 2/ and 3/ in 7b07eea.

1/ Needs no fixing. clang only output additional include after the first one so two is correct.