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

Re: [tortoisesvn] r22809 committed - Do early m_pViewData validity test

From: Stefan Küng <tortoisesvn_at_gmail.com>
Date: Thu, 19 Apr 2012 18:41:49 +0200

On 19.04.2012 08:51, Oto BREZINA wrote:
> BTW What is preffered test for empty(NULL) pointer ?
> pViewData is tested in all ways:
>
> negative tests - leave on no data
>
> pViewData == NULL - my preffered
> pViewData == 0
> !pViewData
>
> positive tests - execute if data
> pViewData

I prefer either
pViewData == NULL

or just
if (pViewData){...}

But you can use whatever you prefer. We don't have rules for this.

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=2949931
To unsubscribe from this discussion, e-mail: [dev-unsubscribe_at_tortoisesvn.tigris.org].
Received on 2012-04-19 18:41:58 CEST

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