Author |
Topic |
|
tasjaevan
New Member
3 Posts |
Posted - Jan 18 2005 : 11:44:32 AM
|
Visual Assist X does not recognise typedefs of function types or function pointers, e.g.
typedef void f(); typedef void (*g)();
f and g do not adopt the 'class, structures and typedefs' colour as they should.
|
|
WannabeeDeveloper
Tomato Guru
Germany
775 Posts |
Posted - Jan 18 2005 : 12:47:09 PM
|
They're colored "Maroon" (Brown) on my system, like all methods...
I'd say this is absolutely okay, since they are pointers to methods(functions), or am I wrong?
|
|
|
|
tasjaevan
New Member
3 Posts |
Posted - Jan 18 2005 : 1:01:45 PM
|
Oh yes, my mistake. My regular editor colour is closer to my method colour than I realised. Visual Assist does recognise them after all.
All the same, I would have expected the colour to be the typedef colour. In your example, LPtsrGetLastError is a pointer type, and you can't call it like a method: LPtsrGetLastError() doesn't make any sense. |
|
|
WannabeeDeveloper
Tomato Guru
Germany
775 Posts |
Posted - Jan 18 2005 : 1:51:46 PM
|
Hmm... agree, you're leading 1:0
I'll point one of the devs into this Topic, maybe they have an explanation (or confirmation that it's a bug).
But, look at this one (Screenshot is from a .cpp which includes the header the first screenshot is from): Notice tsrGetVersion!
There, it's colored fine and as expected... strange, huh? |
|
Edited by - WannabeeDeveloper on Jan 18 2005 1:58:16 PM |
|
|
tasjaevan
New Member
3 Posts |
Posted - Jan 19 2005 : 05:54:48 AM
|
That's what I expected. 'tsrGetVersion' is actually a function pointer, which colour fine. (It's another discussion whether function pointers should look like variables or methods when being called - I don't have a problem with the current scheme, although I'd personally have coloured them as variables.)
It's the function pointer typedefs (e.g. LPtsrGetLastError, LPtsrConnect) which get coloured (incorrectly IMO) as a function/method rather than a class/typedef. |
|
|
|
Topic |
|