[Freeciv-Dev] Re: AI cleanup - first wave
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Raimar Falke wrote:
On Fri, Nov 30, 2001 at 08:58:55PM +0100, Petr Baudis wrote:
I think a requirement should be that someone else go through the
patches
All at once, or as they are submitted?
How are these changes related to the ongoing style
discussion?
I imagine they're much more conformant than the current code, so that
shouldn't be much of an issue.
I also noticed that you made changes which is the job of
indent. Like this
- }
- else {
+ } else {
Another time for the "feed all code through indent" discussion?!
Ugh. I'm in favor of such a move (though I can certainly see its
drawbacks), but such discussions always result in much time spent and no
changes being made. The question, really, is: is more time going to be
wasted figuring out code that indent mangles and working around the
annotate problems, or fixing code that indent could easily handle (like
in this case)?
As for the style: we have to add another question:
A
if (is_barbarian(pplayer)) {
....
/* If not barbarian, ... */
} else {
B
if (is_barbarian(pplayer)) {
....
} else { /* If not barbarian, ... */
C
if (is_barbarian(pplayer)) {
....
} else {
/* If not barbarian, ... */
I have in many places seen Thue's comments go like this:
D
if (is_isometric) {
...
} else { /* if (is_isometric) */
...
}
I find these very hard to read. I also find A very hard to read. B
would be my choice, but C is good as well.
As for the question you have asked: we should try one function at a
time and see how this works.
The problem with this is that if each patch has a one-week lag time
before being commited it'll take way too long. If you can handle a
one-day lagtime, then it should be reasonable. (How many functions are
we talking about here, anyway?)
jason
|
|