[haiku-commits] Re: haiku: hrev44475 - src/kits/interface

  • From: "Ingo Weinhold" <ingo_weinhold@xxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Mon, 06 Aug 2012 00:33:37 +0200

On Mon,  6 Aug 2012 00:08:59 +0200 (CEST) leavengood@xxxxxxxxx wrote:
> 57c5b09: Use be_control_look != NULL everywhere in the Interface Kit.

Out of curiosity, why is this still checked anyway? The object is created in 
the interface kit initialization and therefore the condition always holds. IIRC 
originally the two cases existed to have an easy way to compare the old look 
with the one using BControlLook, but now the else case is just dead code. Or do 
I miss something?

>   Should not be a functional change. It is not in the Haiku Coding
> Guidelines but
>   I feel like 'if (object != NULL)' is generally preferred to 'if
> (object)', plus
>   in this case of be_control_look that is the more common style.

Yeah, it seems some of the code examples in the coding guidelines even use the 
"wrong" style.

CU, Ingo

Other related posts: