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

Re: code in log cache

From: Stefan Fuhrmann <stefanfuhrmann_at_alice-dsl.de>
Date: Sat, 1 Nov 2008 11:45:50 +0100

From: Stefan Küng <tortoisesvn_at_gmail.com> wrote:

> In LogCacheStatistics.cpp, line 129 there's this method:
>
> size_t CLogCacheStatistics::GetSizeOf (const CCachedLogInfo& container)
> {
> return GetSizeOf (container.revisions)
> + GetSizeOf (container.logInfo)
> + GetSizeOf (container.skippedRevisions)
> + sizeof (container.fileName)
> + sizeof (container.fileName.capacity() * sizeof (wchar_t))
> + sizeof (container);
> }
>
> The statement sizeof (container.fileName.capacity() * sizeof (wchar_t))
> seems wrong to me: the outer sizeof() isn't really defined?

I guess it evaluates to sizeof (size_t).

> If that's really what you wanted, please add a comment to that code so I
> don't get confused every time I browse through it :)

Yup. That's a simple copy'n'pasto. Fixed in r14470.
Thanks for noticing!

-- Stefan^2.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe_at_tortoisesvn.tigris.org
For additional commands, e-mail: dev-help_at_tortoisesvn.tigris.org
Received on 2008-11-01 10:44:27 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.