Versions
VA Assist X 10.2.1446.0
Visual Studio 2005 Team Ed for S/W Archs, us-en, 8.0.50727.42
Summary
The suggested auto-insert text for a C++ function parameter list is wrong if the function includes stack objects as default parameters.
Example
Here's the function declaration in the .h file:
class Path
{
...
void addZoomSegment(double s, double e, const Ease& easeIn = Ease(), const Ease& easeOut = Ease());
...
};
Ease is an object. The easeIn and easeOut parameters use default-constructor instances of the Ease object as their default vaules.
When you type the following into the .cpp file:
void Path::addZoomSegment(
the suggestion in the tooltip is:
double s, double e, const Ease& easeIn /* = Ease */
And if this suggestion is accepted exactly that code is inserted.
Observed
The "()" after the Ease initializer are missing. and the easeOut parameter is left out completely. Other subsequent parameters, if they existed, would also be missing.
Expected
The expected suggestion would be the following:
double s, double e, const Ease& easeIn /* = Ease() */, const Ease& easeOut /* = Ease() */
Probable Cause
The code that tries to collect the rest of the parameters probably got confused by the "()" after the first Ease object. But I'll leave it you guys to figure out what's really wrong :-)
Thanks,
Bryan
Microsoft, Inc.
VA user since VS6
--------------------
VA_X.dll file version 10.2.1446.0 built 2006.05.31
Licensed to:
VA X: [email protected] (1-user license) Support ends 2006.06.27 (eek!)
VA.NET 7.1: [email protected] (1-user license)
VAOpsWin.dll version 1.3.2.4
VATE.dll version 1.0.4.14
DevEnv.exe version 8.0.50727.42
msenv.dll version 8.0.50727.42
Font: ProFontWindows 11(Pixels)
Comctl32.dll version 6.0.2900.2180
WindowsNT 5.1 Build 2600 Service Pack 2
4 processors
Platform: Win32