Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
User name:
Password:
Save Password
Forgot your password?

 All Forums
 Visual Assist
 Feature Requests
 #include improvement
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

znakeeye
Tomato Guru

379 Posts

Posted - Sep 07 2009 :  08:28:35 AM  Show Profile  Reply with Quote
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).

Lio
Senior Member

25 Posts

Posted - Sep 07 2009 :  8:13:16 PM  Show Profile  Reply with Quote
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
Go to Top of Page

znakeeye
Tomato Guru

379 Posts

Posted - Sep 08 2009 :  03:37:22 AM  Show Profile  Reply with Quote
Or at least underline ("misspelled") suspect include-statements...
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19014 Posts

Posted - Sep 08 2009 :  11:27:32 AM  Show Profile  Reply with Quote
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.

zen is the art of being at one with the two'ness
Go to Top of Page

Lio
Senior Member

25 Posts

Posted - Sep 08 2009 :  9:14:57 PM  Show Profile  Reply with Quote
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
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000