T O P I C R E V I E W |
pocruadhlaoich |
Posted - Mar 08 2019 : 05:39:45 AM Hi, would it be possible for code inspection to detect if a method should be made const? |
3 L A T E S T R E P L I E S (Newest First) |
feline |
Posted - Mar 12 2019 : 1:11:48 PM 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 |
pocruadhlaoich |
Posted - Mar 11 2019 : 08:10:02 AM 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. |
feline |
Posted - Mar 08 2019 : 09:59:11 AM 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? |