Subject: Re: ZAP/[patch] Martin's cursor position POW
From: Thomas Fletcher (thomasf@qnx.com)
Date: Thu Jan 25 2001 - 07:06:42 CST
On Thu, 25 Jan 2001, Sam TH wrote:
> I just have two nitpicky little minor concerns.
>
> 1) One minor coding style issue.
>
> Instead of this:
>
> if(lff) pActiveView lff->getCurrentView();
> else pActiveView this;
> =09
> we usually do this:
>
> if(lff)
> pActiveView lff->getCurrentView();
> else
> pActiveView this;
>
> Not that one way is better than the other, but consistency is good.
Actually I would even go so far as to say that what it should be is:
if(lff) {
pActiveView = lff->getCurrentView();
} else {
pActiveView = this;
}
(Pick your favourite bracing technique and use it) The reason is
so that it is easier to insert debugging code without the possibility
of messing up the ordering of the code.
> 2) Comments.
>
> This is something new that I want to suggest. I think every new
> function that we write (at a minimum, all the XP ones) should have at
> least a short comment, preferably for Doxygen, explaining what it
> does. If we follow this practice, our code will soon become much
> clearer and easier to understand (keep your fingers crossed).
>
> What do people think about that?
I think that this would be great and would even go so
far as to volunteer to start documenting the platform
specific code (since that is generally what I know best
compared to the generic XP internals) as it applies to
the XP code. Since I know nothing about doxygen, is there
a format that I need to use to do the documentation? Do
we have a template we want to use for our functions? Where
do the comments for the functions go ... in the .h or
the .cpp files?
Make some reasonable guidlines, put them up somewhere so
I (we) can see them and it will be a start.
Thomas
-------------------------------------------------------------
Thomas (toe-mah) Fletcher QNX Software Systems
thomasf@qnx.com Neutrino Development Group
(613)-591-0931 http://www.qnx.com/~thomasf
This archive was generated by hypermail 2b25 : Thu Jan 25 2001 - 07:06:53 CST