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

Re: svn commit: r1413482 - /subversion/trunk/subversion/libsvn_subr/string.c

From: Branko Čibej <brane_at_wandisco.com>
Date: Mon, 26 Nov 2012 19:33:35 +0100

On 26.11.2012 18:43, Julian Foad wrote:
> Hi Brane. It looks basically fine to me. A few stylistic comments below.

Thanks, I'll take them into account.

> + while (new_size < size)
> + {
> + /* new_size is aligned; doubling it should keep it aligned */
> + const apr_size_t prev_size = new_size;
> 'const' is typically not used on a local variable of short scope.

I tend to disagree on that one. The hint to the compiler isn't strictly
necessary these days, but the hint to the programmer definitely is. It's
my strong opinion that we should be using const more often rather than less.

-- Brane

Branko Čibej
Director of Subversion | WANdisco | www.wandisco.com
Received on 2012-11-26 19:34:13 CET

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