Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Feature Requests
 Code Inspection: C-style cast to ..._cast<>

You must be registered to post a reply.
Click here to register.

Screensize:
UserName:
Password:
Format: BoldItalicizeUnderlineStrikethrough Align leftCenterAlign right Insert horizontal ruleUpload and insert imageInsert hyperlinkInsert email addressInsert codeInsert quoted textInsert listInsert Emoji
   
Message:

Forum code is on.
Html is off.

 
Check to subscribe to this topic.
   

T O P I C    R E V I E W
barto Posted - Jul 27 2017 : 08:17:42 AM
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
1   L A T E S T    R E P L I E S    (Newest First)
feline Posted - Jul 27 2017 : 10:34:19 AM
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

© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000