Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Technical Support
 Extract Method creates invalid code (&C::m)

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
legalize Posted - Jun 16 2014 : 11:07:32 AM
See test suite at http://d3dgraphicspipeline.codeplex.com/releases/view/39824

typedef void (Bar::*MethodPtr)(int);
MethodPtr Method4(int x)
{
    MethodPtr member;
    if (x < 0)
    {
        // #TEST#: EM4 Extract Method on next line
        // #TEST#: EM20 Extract Method on rhs of assignment
        member = &Bar::Operation1;
    }
    else
    {
        member = &Bar::Operation2;
    }
    return member;
}

Extract Method EM20 produces:

typedef void (Bar::*MethodPtr)(int);
MethodPtr Method4(int x)
{
    MethodPtr member;
    if (x < 0)
    {
        // #TEST#: EM4 Extract Method on next line
        // #TEST#: EM20 Extract Method on rhs of assignment
        member = MyMethod();
    }
    else
    {
        member = &Bar::Operation2;
    }
    return member;
}

void MyMethod()
{
    return &Bar::Operation1;
}
4   L A T E S T    R E P L I E S    (Newest First)
feline Posted - Jun 22 2014 : 10:27:36 PM
I realise this, but this has to fit in around all of my other work, and the complete project is a long way from a focussed and clear bug report for a single problem. So the bugs need to be isolated and pinned down, so we know what is actually going wrong. So this is going to take however long it takes.
legalize Posted - Jun 17 2014 : 11:30:54 PM
quote:
Originally posted by feline
Hopefully though you can see why working through your project is going to be a very slow process, since I need to actually identify the triggers for the bugs, whenever possible.



It took me a couple hours to manually work my way through the test cases I reported in the summary post. Obviously you don't need to work through the ones that passed. Download the whole suite and work through the ones that fail -- the suite is the context for each reported problem. That's why I'm including the link to the suite in each related bug report.
feline Posted - Jun 16 2014 : 6:32:09 PM
Got it, I have been able to reduce this down to a simple reliable test case:

case=83005
feline Posted - Jun 16 2014 : 5:09:55 PM
Unfortunately you have stripped out to much of the surrounding code, I am not seeing this problem with this code sample. Also you have posted a code sample with two different instructions, EM4 and EM20, and not indicated which one you are reporting a problem with. I am seeing the same problem with EM20 in the test project, so something else is involved in triggering this problem. Looking into this now.

Hopefully though you can see why working through your project is going to be a very slow process, since I need to actually identify the triggers for the bugs, whenever possible.

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