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
 Syntax highlight problem with enum value
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Marci
New Member

Hungary
4 Posts

Posted - Apr 07 2016 :  08:12:03 AM  Show Profile  Reply with Quote
Hello,

VA_X.dll file version 10.9.2094.0 built 2016.03.25
DevEnv.exe version 14.0.24720.0 Community
msenv.dll version 14.0.24720.0
Comctl32.dll version 6.10.10586.0

In C++, when a variable has the same name as an enumeration value, then the variable's colored as if was enumaration value.

enum class eFruit { Apple, Pear };

int main()
{
int x; // good
int Apple; // colored as if it was enumeration value
int y; // good

feline
Whole Tomato Software

United Kingdom
19015 Posts

Posted - Apr 07 2016 :  1:01:49 PM  Show Profile  Reply with Quote
Unfortunately this is a known effect, and to a degree it is by design. Since our coloring code has to run quickly, to keep up with scrolling and moving around in files, and we are working behind the IDE's back, it is possible to confuse it like this.

This is something we are aware of, but there are no easy fixes.

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

Marci
New Member

Hungary
4 Posts

Posted - Apr 07 2016 :  2:51:38 PM  Show Profile  Reply with Quote
All right, thanks for the answer.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19015 Posts

Posted - Apr 07 2016 :  6:19:03 PM  Show Profile  Reply with Quote
Find References or Rename should handle this correctly, so one option, depending on how often this happens, is to rename the variable to avoid the conflict.

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