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

Re: svn commit: r1345740 - /subversion/trunk/subversion/libsvn_auth_kwallet/kwallet.cpp

From: Peter Samuelson <peter_at_p12n.org>
Date: Sun, 3 Jun 2012 17:42:01 -0500

[Greg Stein]
> > - int argc = 1;
> > - app = new QCoreApplication(argc, (char *[1]) {(char *) "svn"});
> > + int argc = q_argc;
> > + app = new QCoreApplication(argc, q_argv);
>
> Why keep argc around? Just use q_argc.

Because argc is passed by reference (int &argc) and I figured the only
reason to do that is if you intend to modify it.

But looking closer, this code is only ever called once, so fair enough.

Anyway, those two instances have a lot more duplicate code so I'll
probably commit a followup soon to de-dupe it, and I'll remove the
extra variable too.
Received on 2012-06-04 00:42:40 CEST

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

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