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

RE: Re: Patch - unnecessary actions

From: Daniel Klima <danklima_at_gmail.com>
Date: Mon, 8 Aug 2011 00:25:58 -0700 (PDT)

> On 2011-08-04 18:44, Stefan Küng wrote:
> >
> >> Side question how good is VS to use merged strings? From my expirence
> >> using single object (CString) save some conversions and space. This is
> >> minor trought.
> > Can you explain in more detail what you want to do?
> You have many line containing something like:
> String += '\t';
>
> In some languages and compilers there is not direct String + char*
> this make string object creation for '\t' every time you use it. It may
> be marginaly improvement to use String + String. However I use VC only
> for TSVN.
>
> > Stefan
> >

As far as I can tell from source code of MFC*, it allocates new buffer and copies char(s) there.

So no conversion.

*I think MFC is used...

Note:There are several layers of templates and typedefs, but it is down to calling AppendChar:
==
void AppendChar(_In_ XCHAR ch)
        {
                UINT nOldLength = GetLength();
                int nNewLength = nOldLength+1;
                PXSTR pszBuffer = GetBuffer( nNewLength );
                pszBuffer[nOldLength] = ch;
                ReleaseBufferSetLength( nNewLength );
        }
==

Klimax

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

To unsubscribe from this discussion, e-mail: [dev-unsubscribe_at_tortoisesvn.tigris.org].
Received on 2011-08-08 09:42:13 CEST

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.