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
 Technical Support
 C++ references highlighting
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

v_v
Senior Member

Russia
29 Posts

Posted - Sep 04 2010 :  3:32:05 PM  Show Profile  Reply with Quote
Hello!
I don't know if this behavior is a bug or just by design, but I think that variables, passed to function by non-constant references should be highlighted as "l-value" (light red). And the same thing for structures if their members being modified. Some pictures for example:

The "context" variable is passed to the procedure "captureStack" by non-constant reference (and is modified there), but still highlighted as it is constant expression (I use default color scheme).
Another example:

"exceptionInfo" is a variable being modified on every line except definition. But all coloring as if it doesn't change at all =(

accord
Whole Tomato Software

United Kingdom
3287 Posts

Posted - Sep 06 2010 :  04:18:19 AM  Show Profile  Reply with Quote
We are planning to indicate when variables passed by reference:

case=9955

Regarding members being modified: I'm not sure what is the right thing to do here: you are modifying the variables inside the object. Replacing the whole content or changing and object pointer or reference is a different thing. If I look for places where a pointer is changed maybe it would be disturbing if we indicated all places were its content is modified.
Go to Top of Page

v_v
Senior Member

Russia
29 Posts

Posted - Sep 06 2010 :  06:01:43 AM  Show Profile  Reply with Quote
Thank you for reply!

I know, that highlighting object's members modification is different thing, not connected with passing variables to function by references. I've just enumerated all strange (in my opinion) features of this colouring.

As of members modification (and calling non-constant functions too) - I use such reasoning: if some part of an object is changed, the object in whole is changed too. May be I'm not a "right" user - I don't think about an object variable as it is just a reference =)
But I agree with you, that changing pointer and changing content it points should not be mixed - may be the third colour is suitable? It seems that all three possibilities doesn't intersect.

P.S. Sorry, but I'm new on this forum, could I ask you to show me, where can I see that case, you've mentioned above?
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18951 Posts

Posted - Sep 06 2010 :  09:45:09 AM  Show Profile  Reply with Quote
Unfortunately you cannot see the case, since it is in our internal bug tracking system. This forum thread should be updated when the case is fixed, and the case number should also be listed on the history of changes page:

http://docs.wholetomato.com?W318

http://www.wholetomato.com/support/history.asp

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

v_v
Senior Member

Russia
29 Posts

Posted - Sep 06 2010 :  09:51:41 AM  Show Profile  Reply with Quote
Thank you.
Hope, that members modification case will be took into account too =)
Go to Top of Page

accord
Whole Tomato Software

United Kingdom
3287 Posts

Posted - Sep 06 2010 :  2:12:49 PM  Show Profile  Reply with Quote
I have put in a feature request to indicate partly modified objects to see what the developers make of it:

case=49629

As for calling const functions: we are considering doing this at some point:

case=22595
Go to Top of Page

v_v
Senior Member

Russia
29 Posts

Posted - Sep 07 2010 :  04:49:22 AM  Show Profile  Reply with Quote
Wish it to happen during my current subscription (this year) =)
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