Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Technical Support
 Constant on the left

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
pocruadhlaoich Posted - Sep 27 2017 : 09:40:23 AM
Hi,
the code inspection feature "Zero constant can be replaced with nullptr" is very useful. Is it possible to customise the action it performs so that it will place the constant on the left?

if (0 == pBlah)
if (pBlah == 0)

would be replaced with

if (nullptr == pBlah)

Currently the replace will happen in situ but it would be great to further improve the change to adhere to local coding standards.
Thanks,
Patrick
6   L A T E S T    R E P L I E S    (Newest First)
feline Posted - Sep 20 2018 : 5:02:34 PM
Unfortunately no progress on this yet, but it is still in our list of feature requests, so we are aware of this and have not forgotten about it.
pocruadhlaoich Posted - Sep 19 2018 : 08:06:51 AM
Is there any update on this feature request please?
feline Posted - Oct 21 2017 : 09:51:42 AM
Oops, I forgot to include the case number for the feature request:

case=111349

zzdev10, this feature request is specific to changes made to your code by Code Inspection, rather than checking for checks where the constant value is on the left hand side.

I have put in a feature request to check for this in general, since it seems a fair point:

case=111878
zzdev10 Posted - Oct 20 2017 : 1:19:43 PM
I'd like to add a vote for this feature. It would be very useful if if code inspection was detecting and correcting cases like if( 0 == pBlah ).
pocruadhlaoich Posted - Sep 27 2017 : 12:50:29 PM
Cool, thanks feline. Please let me know of any updates!
feline Posted - Sep 27 2017 : 10:53:58 AM
An interesting thought, I have put in a feature request to see what our developers make of this. Generally we are wary of getting to much into code formatting / coding standards, since there are so many different standards and rules, it would lead to a mass of options. Still, this one does make a lot of sense.

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