T O P I C R E V I E W |
dango |
Posted - Jan 31 2007 : 08:26:50 AM 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 |
2 L A T E S T R E P L I E S (Newest First) |
feline |
Posted - Jan 31 2007 : 12:51:40 PM I am seeing the same effect here. Thank you for the clear description.
case=4841 |
dango |
Posted - Jan 31 2007 : 08:29:04 AM 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 }
|