On 2008-02-05 at 18:55 +0100, Alexander Barton wrote:
I'm not sure about this one: in the first place, the variant suggested by Dana looks cleaner, but the "double braces" required to calm down gcc make it ugly. So its ... a little bit ugly either way :-)
I wasn't going to follow up on this because, well, it seems like a small issue, but since there are 2 posts about it already... :)
My sense is it's generally not a good idea to duplicate even one line of code because it makes maintenance more complex (if only a little). For example, if the call to Channel_FirstChannelOf needed to change somehow, it would have to be changed in 2 places here instead of 1, or else a bug could potentially result.
But, as I wrote to Florian off-list, I don't actually feel all that strongly about it. I'm sure it will be fine either way. :)
Dana