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
 Extract Method and reference...
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

dango
Junior Member

20 Posts

Posted - Jan 31 2007 :  08:26:50 AM  Show Profile  Reply with Quote
1544 vs 2003:
class Bar
{
public:
int myInt;
};


Foo::Foo(void)
{
std::vector<Bar::SubClass> bars(100);

for (int i=0; i < bars.size(); ++i)
{
Bar::SubClass& bar = bars[i];
//Extract Method from Here
bar.myInt = i;
// To Here
}
}
When you extract method you get:
void MyMethod( Bar::SubClass& * &bar, int i )
{
//Extract Method from Here
bar.myInt = i;
// To Here
}

Please note the type of bar: & * &

I think just & would be sufficient...

Thanks

dango
Junior Member

20 Posts

Posted - Jan 31 2007 :  08:29:04 AM  Show Profile  Reply with Quote

oops didn't mean to have that ::SubClass -


std::vector<Bar> bars(100);

for (int i=0; i < bars.size(); ++i)
{
Bar& bar = bars[i];
//Extract Method from Here
bar.myInt = i;
// To Here
}
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18749 Posts

Posted - Jan 31 2007 :  12:51:40 PM  Show Profile  Reply with Quote
I am seeing the same effect here. Thank you for the clear description.

case=4841

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