Chris Waterson wrote:
>
> Sorry, thought of some other things...
>
> Chris Waterson wrote:
>
> > But, above all, FOLLOW LOCAL CONVENTION! Your job is not to proselytize
> > Your Favorite Style. Your job is to make it easier on the next person
> > that has to work on the mess. This applies to:
>
> ...but does _not_ apply to:
>
> - Use of manual refcounting. You're allowed to ``upgrade''
> crufty old COM code to use nsCOMPtr
I'm happy to see people do this when they know what they're
doing. Special caution is required when using nsCOMPtrs on
concrete class pointers (as opposed to interface pointers). See
scc's fine posting (that he promises to integrate into the main
docs):
news:[EMAIL PROTECTED]
I've seen cases that *almost* work or work only on some
compilers.
>
> - C-style casts. You're allowed to ``upgrade'' a C-style
> cast to NS_STATIC_CAST or NS_REINTERPRET_CAST.
I'm a luddite... I often find plain ol' C casts more readable
than uses of NS_REINTERPRET_CAST. But, one should always be
questioning if there is something wrong with the design of code
that is requiring a cast to be present at all.
John.