t-artistik / qtscriptgenerator

Automatically exported from code.google.com/p/qtscriptgenerator
0 stars 0 forks source link

deal with dead code #19

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
There are places where code is effectively dead. But the compiler will
still compile this code in. So it should either be removed or fixed if
necessary.

1. add_extra_include_for_type in abstractmetalang.cpp checks the validity
of type at line 1562 but at this point it has to be valid. So checking is
not necessary.

2. In parser.cpp there is an idiom where the boolean isVector is set to
true and then the while loop sets it to true. It should be initialized to
false. Otherwise isVector never changes and the conditionals that check it
later are dead.

3. addRemoveFunctionToTemplates in typesystem.cpp has a big chunk of
assignments that are dead because of the return statement. Rather then
return, just comment out for now so it doesn't bulge the object code.

Original issue reported on code.google.com by erik.e.h...@jpl.nasa.gov on 23 Nov 2008 at 7:18

Attachments:

GoogleCodeExporter commented 8 years ago

Original comment by kentm...@gmail.com on 23 Dec 2008 at 2:45