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

Re: Patch: reducing amount of duplicate code

From: Stefan Küng <tortoisesvn_at_gmail.com>
Date: Fri, 04 Sep 2009 18:49:17 +0200

On 04.09.2009 15:15, Dmitry wrote:
> Hey.
>
> Meanwhile I've factored out some other common code. Also in
> FileDropEdit.h there's a loop condition:
>
> (hr==S_OK&& cbRead>0)&& SUCCEEDED(hr))
>
> the problem here is that "hr==S_OK" implies "SUCCEEDED(hr)", so it is
> equivalent to just
>
> (hr==S_OK&& cbRead> 0)
>
> however I'm not sure what the original intent was - should it be
> testes for == S_OK or for SUCCEEDED()? There're cases when COM
> methods return HRESULTs different from S_OK but still evaluating
> SUCCEDED() to "true".

You're right. The SUCCEEDED() isn't needed.
Fixed in r17120 and applied your patch in r17119.

Stefan

-- 
        ___
   oo  // \\      "De Chelonian Mobile"
  (_,\/ \_/ \     TortoiseSVN
    \ \_/_\_/>    The coolest Interface to (Sub)Version Control
    /_/   \_\     http://tortoisesvn.net
------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=757&dsMessageId=2391053
To unsubscribe from this discussion, e-mail: [dev-unsubscribe_at_tortoisesvn.tigris.org].
Received on 2009-09-04 18:49:41 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.