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
 final macro
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

sykim25
New Member

2 Posts

Posted - Feb 10 2014 :  10:18:09 PM  Show Profile  Reply with Quote
10.8.2023.0 built 2013.12.20

VS 2010 English

#ifdef _MSC_VER
# if _MSC_VER >= 1800
# define __FINAL__ final
# elif _MSC_VER >= 1600
# define __FINAL__ sealed
# else
# define __FINAL__
# endif
#else
# define __FINAL__
#endif

struct AAA __FINAL__
{
int x;
};


when i use this code, __FINAL__ is the type color.
and AAA is just black.

Edited by - sykim25 on Feb 10 2014 10:40:16 PM

feline
Whole Tomato Software

United Kingdom
18947 Posts

Posted - Feb 12 2014 :  7:46:38 PM  Show Profile  Reply with Quote
I am seeing the same effect here. Thank you for the clear description. If you create a new file called "va_stdafx.h", and place it in the same directory as your solutions .SLN file, and add the content:

# define __FINAL__ sealed

and make sure the file ends with a blank line. There is no need to add the file to your solution, VA looks for the file by name. Now trigger a rebuild of your solution:

VA Options -> Performance -> Rebuild symbol databases

This is explained in more detail here:

https://wholetomato.fogbugz.com/default.asp?W302

this has fixed the problem for me, so it will hopefully fix this for you as well.

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

sykim25
New Member

2 Posts

Posted - Feb 12 2014 :  10:55:23 PM  Show Profile  Reply with Quote
Thanks.

It fix the color by override feature.

I hope next version is better because of this report.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18947 Posts

Posted - Feb 13 2014 :  7:56:38 PM  Show Profile  Reply with Quote
VA is designed to parse all branches when it sees a #if #endif or #if #else #endif block, so that it can be active inside and help with you coding all branches. So VA is seeing all of the #defines.

As a general rule VA uses the first version of a #define it sees when there is more than one version present. So re-ordering the #define's in the code can help here, or you can instead use the "va_stdafx.h" file, which is parsed before your solution, to set the version you want VA to use.

I hope this makes sense, and helps to explain what is happening here. What I am not sure of is why your code was confusing VA, but thankfully the "va_stdafx.h" file is a simple fix.

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