On Friday 09 August 2002 1:30 pm, Lars Gullik Bjønnes wrote:
> Angus Leeming <[EMAIL PROTECTED]> writes:
> | On Friday 09 August 2002 12:14 pm, Angus Leeming wrote:
> >> 2. Alternatively, it could be a non-member function
> >>
> >> void Counters::copy(Counters const & from, Counters & to)
> |
> | That's
> | void copy(Counters const & from, Counters & to)
>
> How is this then different from a member function
>
>     void operator=(Counters const & from) ??

Well that would copy from.counterList to this->counterList which is different 
from what I believe it is meant to be doing:

void Counters::copy(Counters const & from)
{
        CounterList::iterator it  = counterList.begin();
        CounterList::iterator end = counterList.end();
        for (; it != end; ++it) {
                it->second.set(from.value(it->first));
        }
}

Anyway, patch to follow.

Angus

Reply via email to