[Clam-devel] re: small patch

dirk.griffioen dirk.griffioen at barcelonamedia.org
Tue Jun 9 01:20:12 PDT 2009

> Why do you need the non-pointer type? Won't this work?
>	nrOfPorts += (*it)->GetPorts().size();

Thanks! Missed that - I try not to be too clever, but sometimes it just happens ...

(It was just that the alias

        AudioSource::Ports const& ports = (*it)->GetPorts();
        for(unsigned port = 0; port < ports.size(); ++port)

means more to me than 

        for(unsigned port = 0; port < (*it)->GetPorts().size(); ++port)

so I got 'fixed on getting that

> BTW, an efficiency bug in previous code, not using reference to containers 
> implies a copy of the ports container (and warns for object aliasing).

Seen it ... 

More information about the clam-devel mailing list