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
 Code inspection const
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

pocruadhlaoich
Senior Member

Ireland
39 Posts

Posted - Mar 08 2019 :  05:39:45 AM  Show Profile  Reply with Quote
Hi, would it be possible for code inspection to detect if a method should be made const?

feline
Whole Tomato Software

United Kingdom
15980 Posts

Posted - Mar 08 2019 :  09:59:11 AM  Show Profile  Reply with Quote
Probably not any time soon. As soon as you get past trivial functions, you need to be checking all of the calls, all of the way down. Which requires scanning across possibly quite a lot of the solution, and the libraries you are using.

Or are you thinking of using this in a limited scope, where this could be worked out more directly?

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

pocruadhlaoich
Senior Member

Ireland
39 Posts

Posted - Mar 11 2019 :  08:10:02 AM  Show Profile  Reply with Quote
I had been thinking about detecting that const could to be added to existing, simple GetXXX() methods of a class. I understand that deeper searches would be required for all methods but getters should be much more easily detectable.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
15980 Posts

Posted - Mar 12 2019 :  1:11:48 PM  Show Profile  Reply with Quote
This does keep the check nice and focused, and limited. I have put in a feature request to see what our developers make of it. But I am a little concerned about this being the thin end of the wedge for checking more widely that something could be const:

case=137644

zen is the art of being at one with the two'ness
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
© 2019 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000