gnash-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gnash-dev] Re: AMF::encodeObject,encodeElement


From: strk
Subject: Re: [Gnash-dev] Re: AMF::encodeObject,encodeElement
Date: Tue, 18 Nov 2008 22:42:25 +0100

On Tue, Nov 18, 2008 at 02:39:05PM -0700, Rob Savoye wrote:

> > reason for AMF::encodeElement to take a shared_ptr<Element>
> > rather then a const Element& ?
> 
>   Because often the Element being passed in is stored in an vector of
> shared_ptrs, which is used to store the properties of an object.

You can dereference a shared_ptr, obtaining a ref to the element in it:

        shared_ptr<Element> myElement = getElement();
        const Element& myElementRef = *myElement;

--strk;




reply via email to

[Prev in Thread] Current Thread [Next in Thread]