[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: Dmitry <wipedout_at_yandex.ru>
Date: Fri, 04 Sep 2009 17:15:33 +0400

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".

Best wishes.
Dmitry.

------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=757&dsMessageId=2391012

To unsubscribe from this discussion, e-mail: [dev-unsubscribe_at_tortoisesvn.tigris.org].

Received on 2009-09-04 15:23:08 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.