So I have a function written as follows
Code:
inline
tSomething::tSomething(map<int, tSomethingElse* > const & Points,
tWhatever const * a_ptr,
int ID,
vector<vector<int> > const & one,
vector<bool> const & two,
vector<int> const & three):
_ID(ID),_a_ptr(a_ptr),_points(Points),_one(one),_two(two),_three(three)
{
for (map<int,tSomethingElse*>::const_iterator it = _points.begin(); it != _points.end(); it++)
_stamp.push_back(it->first);
sort(_stamp.begin(),_stamp.end());
Target();
}
and now I have to take
Code:
inline
tSomething::tSomething(std::vector<tSomething::tSomethingElse*, std::allocator<tSomething::tSomethingElse*> >& Points,
tWhatever const * a_ptr,
_a_ptr(a_ptr),_points(Points)
and write a for loop that does the same thing, so...
Code:
{
for (???)
_stamp.push_back(it->first);
sort(_stamp.begin(),_stamp.end());
Target();
}
but I am having trouble adapting the code. Is it straightforward or not really possible with the change of format?
Thanks in advance