Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Technical Support
 Syntax highlight problem with enum value

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
Marci Posted - Apr 07 2016 : 08:12:03 AM
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
3   L A T E S T    R E P L I E S    (Newest First)
feline Posted - Apr 07 2016 : 6:19:03 PM
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.
Marci Posted - Apr 07 2016 : 2:51:38 PM
All right, thanks for the answer.
feline Posted - Apr 07 2016 : 1:01:49 PM
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.

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