| T O P I C    R E V I E W | 
              
                | znakeeye | Posted - Sep 07 2009 : 08:28:35 AM Most projects out there suffer from #include-misuse. When possible, forward declarations should be used.
 
 It would be great if VAX could parse ALL files in a project and remove unnecessary include-statements and replace them with forward declarations (if needed). Hence, all include/declare logic would be created by VAX (for the programmer to review, of course).
 | 
              
                | 4   L A T E S T    R E P L I E S    (Newest First) | 
              
                | Lio | Posted - Sep 08 2009 : 9:14:57 PM 
 quote:Originally posted by feline
 
 The idea of highlighting unnecessary #include statements has come up before, so it is probably worth having a look at:
 
 case=32032
 
 Working out that you can replace a #include with a forward declaration is a very interesting idea, but if this is done in a header file it is going to require updating some or even every .cpp file that includes this header file either directly or indirectly, so I am a little concerned about this.
 
 
 
 It doesn't have to be done automatically (probably shouldn't be)... Just highlighting it so someone can then do it manually would be great.
 
 Lio
 | 
              
                | feline | Posted - Sep 08 2009 : 11:27:32 AM The idea of highlighting unnecessary #include statements has come up before, so it is probably worth having a look at:
 
 case=32032
 
 Working out that you can replace a #include with a forward declaration is a very interesting idea, but if this is done in a header file it is going to require updating some or even every .cpp file that includes this header file either directly or indirectly, so I am a little concerned about this.
 | 
              
                | znakeeye | Posted - Sep 08 2009 : 03:37:22 AM Or at least underline ("misspelled") suspect include-statements...
 | 
              
                | Lio | Posted - Sep 07 2009 : 8:13:16 PM 
 quote:Originally posted by znakeeye
 
 Most projects out there suffer from #include-misuse. When possible, forward declarations should be used.
 
 It would be great if VAX could parse ALL files in a project and remove unnecessary include-statements and replace them with forward declarations (if needed). Hence, all include/declare logic would be created by VAX (for the programmer to review, of course).
 
 
 
 I'll second that 1!
 
 Lio
 |