VclPtr tweaks post 5.4.2 ...

Michael Meeks michael.meeks at collabora.com
Wed May 31 13:33:37 UTC 2017


On 31/05/17 13:02, Miklos Vajna wrote:
> The standard smart pointers are in the form of std::foo_ptr, so if we
> have VclPtr, VclDisposingPtr is perhaps a more natural (and shorter)
> name than VclPtrAutoDispose?

	Love it =)

On 30/05/17 10:49, Michael Stahl wrote:
> could we also get rid of this:
>
>     operator reference_type * () const
>     {
>         return m_rInnerRef.get();
>     }
>
> i understand that dangerous traps like this are idiomatic C++ and
> required to keep the Java programmers out of our code base etc., but
> still...

	Haha =) so, I guess this would mean a large cleanup of Foo * to const
VclPtr<Foo> & across lots and lots of function parameters; otherwise
we'll need really a lot of '.get()'s left and right.

	Luckily that is something we can do incrementally I guess, one method
at a time; prolly it deserves an easy hack. Would be nice to cleanup all
local variables (we only converted member variables) to use VclPtr too I
guess.

	ATB,

		Michael.

-- 
michael.meeks at collabora.com <><, Pseudo Engineer, itinerant idiot


More information about the LibreOffice mailing list