Re: svn commit: r1327695 - /subversion/trunk/subversion/libsvn_subr/checksum.c
On 04/18/2012 02:57 PM, Greg Stein wrote:
> On Wed, Apr 18, 2012 at 17:52,<blair_at_apache.org> wrote:
>> Author: blair
>> Date: Wed Apr 18 21:52:01 2012
>> New Revision: 1327695
>> URL: http://svn.apache.org/viewvc?rev=1327695&view=rev
>> Refactor svn_checksum_create() to avoid two switch statements.
>> * subversion/libsvn_subr/checksum.c
>> New static function that creates a svn_checksum_t * with
>> everything set but the contents of the digest.
>> Use the existing switch statement to get the digest size without
>> needing DIGESTSIZE(). Use checksum_create().
> Couldn't you just lose the switch in favor of: digest_size = DIGESTSIZE(kind) ??
That seemed micro-optimization wasteful, as it's checking the kind if
it's a known checksum once and then checking it again on the size.
Received on 2012-04-19 00:39:40 CEST
This is an archived mail posted to the Subversion Dev