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: C-style cast to ..._cast<>
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

barto
Junior Member

Germany
19 Posts

Posted - Jul 27 2017 :  08:17:42 AM  Show Profile  Reply with Quote
Hi,
I'm loving the VA Code Inspection for updating all my old code.
I think it would be great if it could also suggest converting C-style casts to C++ casts

e.g.
((CSpinButtonCtrl*)GetDlgItem(IDC_SPIN1))->SetRange32(1, 100);
to
static_cast<CSpinButtonCtrl*>(GetDlgItem(IDC_SPIN1))->SetRange32(1, 100);


I reckon it could even figure out whether to use static_cast, const_cast or reinterpret_cast.

Best regards
Bernhard

Edited by - barto on Jul 27 2017 08:18:01 AM

feline
Whole Tomato Software

United Kingdom
19014 Posts

Posted - Jul 27 2017 :  10:34:19 AM  Show Profile  Reply with Quote
I have put in a feature request to see what our developers make of this, but I am not sure if this is something Clang supports, and we are using Clang to power Code Inspection:

case=109944

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:
© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000