On Fri, Apr 12, 2002 at 03:00:11PM +0100, Angus Leeming wrote:
> > The const perhaps.
> 
> I take it you'd like me to make it more secure?
> -     FormatList const & formats = GImage::loadableFormats();
> +     FormatList const formats = GImage::loadableFormats();

By 12.2.5., the temporary object bound to the const reference should live
as long as the reference in this case, i.e. the end of the block.

But I am not completely sure about it, and if it is not a performance
bottleneck, I'd create a copy there...

Andre'

-- 
Those who desire to give up Freedom in order to gain Security,
will not have, nor do they deserve, either one. (T. Jefferson)

Reply via email to