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

CSmartHandle

From: Oto BREZINA <otik_at_e-posta.sk>
Date: Mon, 21 Dec 2015 16:53:25 +0100

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.

Oto

------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=757&dsMessageId=3151595

To unsubscribe from this discussion, e-mail: [dev-unsubscribe_at_tortoisesvn.tigris.org].
Received on 2015-12-21 16:53:33 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.