Author |
Topic |
|
blq
Junior Member
Sweden
18 Posts |
Posted - Oct 11 2006 : 05:36:28 AM
|
Having C-style comments *with commas inside* in a method argument list causes Create&Move refactoring to format incorrectly.
Example: int dummy(/*bla, bla*/);
Refactoring "Create Implementation" and "Move Implementation to Source File" => int dummy(/*bla*/, bla*/)
// Fredrik
|
Edited by - blq on Nov 29 2006 05:58:20 AM |
|
blq
Junior Member
Sweden
18 Posts |
Posted - Oct 11 2006 : 05:40:44 AM
|
I've been using 1535 & 1538 btw. |
Edited by - blq on Dec 14 2006 05:24:07 AM |
|
|
feline
Whole Tomato Software
United Kingdom
19020 Posts |
Posted - Oct 11 2006 : 1:08:43 PM
|
confirmed
case=2970 |
zen is the art of being at one with the two'ness |
|
|
bugfix
Tomato Guru
Germany
324 Posts |
Posted - Dec 14 2006 : 12:25:45 PM
|
just wanted to add that 'Extract Method' is also affected |
http://www.mf-sd.de |
|
|
feline
Whole Tomato Software
United Kingdom
19020 Posts |
Posted - Dec 14 2006 : 5:57:54 PM
|
how are you triggering this problem with Extract Method? Using the function:
static void testingExtract()
{
int nFoo = 0;
nFoo = 3; /* there is a comma, in this comment */
}
and extracting the line with the comment I am not seeing any problems. |
zen is the art of being at one with the two'ness |
Edited by - feline on Dec 14 2006 5:58:29 PM |
|
|
bugfix
Tomato Guru
Germany
324 Posts |
Posted - Dec 15 2006 : 03:20:11 AM
|
class bla
{
STDMETHOD(InterfaceSupportsErrorInfo)(REFIID riid)
{
static const IID* arr[] =
{
&GUID_NULL,
};
for (int i=0; i<sizeof(arr)/sizeof(arr[0]); i++)
{
if (InlineIsEqualGUID(*arr[i], riid))
return S_OK;
}
return S_FALSE;
}
};
now select the for loop and do extract method.
i found this thread after searching for STDMETHOD which pointed me first to TOPIC_ID=5440 and then i ll ended up here:) looking closely there seems to be another bug... the new methods first param uses 'static' as qualifier. |
http://www.mf-sd.de |
Edited by - bugfix on Dec 15 2006 03:20:35 AM |
|
|
feline
Whole Tomato Software
United Kingdom
19020 Posts |
Posted - Dec 15 2006 : 10:07:01 AM
|
static not being removed from the parameter is a known problem
case=4037
When I extract the for loop I get a mismatched bracket on the function:
STDMETHOD( MyMethod( static const IID* arr, REFIID riid )
case=4125
the function is also wrapped in "STDMETHOD", does this seem sensible? I don't claim to understand why STDMETHOD is used, so I don't know if this is sensible or not.
There is also a problem where the new function is called, its value is returned directly. however, thinking about this, I am not sure there is anything VA can do about this, other than possibly display a warning suggesting you are doing something unwise.
case=4126 |
zen is the art of being at one with the two'ness |
|
|
bugfix
Tomato Guru
Germany
324 Posts |
Posted - Dec 15 2006 : 10:17:32 AM
|
its some of those COM odds. id say remove it, as the new extracted function does not implement a COM interface function. like extracting a method from a virtual function. |
http://www.mf-sd.de |
|
|
feline
Whole Tomato Software
United Kingdom
19020 Posts |
Posted - Dec 15 2006 : 10:30:00 AM
|
that makes sense, I have put a note on the case about this. thank you. |
zen is the art of being at one with the two'ness |
|
|
support
Whole Tomato Software
5566 Posts |
Posted - Apr 14 2007 : 12:02:42 AM
|
Case=2970 is fixed in Build 1553. |
|
|
|
Topic |
|