[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 Fuhrmann <stefanfuhrmann_at_alice-dsl.de>
Date: Tue, 8 Sep 2009 12:26:32 +0200

Dmitry <wipedout_at_yandex.ru> wrote:

> In r17132 a new member variable is introduced in CFormatMessageWrapper.
Its interpretation is
> misleading - it's not HRESULT and therefore should not be used with S_
constants. I also suspect
> that it is misused - according to MSDN if FormatMessage() succeeds it
returns the number of
> characters retrieved. It could be 14 for example. Then "result" is 14
after such call. operator
> bool() will compare "14" with "S_OK" (which is 0) and will return
"false".

Oops .. fixed that in r17139. I somehow toggled the
'result != 0' condition twice in my head. Hence, the
use of S_OK for 'no error' and S_FALSE for otherwise.

Thanks for noticing!

-- Stefan^2.

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

To unsubscribe from this discussion, e-mail: [dev-unsubscribe_at_tortoisesvn.tigris.org].
Received on 2009-09-08 12:26:56 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.