[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: CSmartHandle

From: Stefan Küng <tortoisesvn_at_gmail.com>
Date: Mon, 21 Dec 2015 19:37:01 +0100

On 21.12.2015 16:53, Oto BREZINA wrote:
> Hi Stefans
>
> We are using CSmartHanlde little bit in our project, I did simplify it
> little bit (inheretancem descrutctor for close struct, make Close
> static) - original issue was Close was made public, what led me to
> trying use it as most other classes we use got Close (here CloseHanlde
> is correct one).
>
> Anyway I tried to merge changes to actual version of file as we used
> older version of it. I noticed move contructor is used - the thing I
> never used before - And I get bit confised with its implementation
>
> CSmartHandle(CSmartHandle && h)
> {
> if (m_Handle != (HandleType)h)
> ...
>
> Is m_Handle initialized in copy contructor automaticaly? To what? By
> default constructor? Somehow I don't think so.
>
> My implementation would be:
>
> CSmartHandle(CSmartHandle && h)
> {
> m_Handle = NULL_VALUE;
> operator =(h);
> }
>
> It seems to be never used. If you like this implementation more then
> current one, I will commit it with other changes we use.

You're right.
I've changed it in r27081.

Stefan

-- 
        ___
   oo  // \\      "De Chelonian Mobile"
  (_,\/ \_/ \     TortoiseSVN
    \ \_/_\_/>    The coolest interface to (Sub)version control
    /_/   \_\     http://tortoisesvn.net
------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=757&dsMessageId=3151610
To unsubscribe from this discussion, e-mail: [dev-unsubscribe_at_tortoisesvn.tigris.org].
Received on 2015-12-21 19:37:12 CET

This is an archived mail posted to the TortoiseSVN Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.