On Friday 12 April 2002 2:07 pm, Lars Gullik Bjønnes wrote:
> Angus Leeming <[EMAIL PROTECTED]> writes:
> | Thinking about Herbert and Rob's list of loadable graphics formats, I
> | discover the following code:
> |
> | string const findTargetFormat(string const & from)
> | {
> |     typedef GImage::FormatList FormatList;
> |     FormatList const & formats = GImage::loadableFormats();
> |
> | Now GImage::loadableFormats() returns a FormatList, not a FormatList &,
> | so why does this not die horribly?
>
> 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();
Angus

Reply via email to