[MPlayer-cvslog] r21385 - trunk/libvo/osd_template.c
Diego Biurrun
diego at biurrun.de
Sat Dec 2 22:19:54 CET 2006
On Fri, Dec 01, 2006 at 08:34:46PM +0100, Michael Niedermayer wrote:
> On Fri, Dec 01, 2006 at 06:57:31PM +0100, Reimar Döffinger wrote:
> > On Fri, Dec 01, 2006 at 11:23:02AM +0100, Diego Biurrun wrote:
> > >
> > > So can we make up a policy about this? IMO the comments after #else and
> > > #endif should always contain exactly what the #if line contained.
> > > Everything else is either confusing or a pain to search backwards to...
> >
> > Yes, of course, that's the only way that overall makes sense, which one
>
> i disagree, one sane way is to make the condition match what the argument
> of a #if would be if there where a #if there
>
> #if HAVE_MMX
> a few pages of mmx code
> #else //!HAVE_MMX
> a few pages of c code
> #endif //!HAVE_MMX
>
> and
>
> #if HAVE_MMX
> a few pages of mmx code
> #endif //HAVE_MMX
>
> otherwise when you see just the endif the comment becomes useless as its
> meaning would flip depending on the existence of a #else a few pages up
I disagree, '#else /* HAVE_MMX */' is clear to me. Also what happens if
some #elif is added in between, you'd have to update the #endif comment.
This is likely to get overlooked.
Diego
More information about the MPlayer-cvslog
mailing list