Complete.Org: Mailing Lists: Archives: freeciv-dev: August 2001:
[Freeciv-Dev] Re: Pop cost patch (resending via bug system) (PR#897)
Home

[Freeciv-Dev] Re: Pop cost patch (resending via bug system) (PR#897)

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Arien Malec <arien_malec@xxxxxxxxx>
Cc: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: Pop cost patch (resending via bug system) (PR#897)
From: Trent Piepho <xyzzy@xxxxxxxxxxxxx>
Date: Mon, 20 Aug 2001 16:09:58 -0700 (PDT)

On Mon, 20 Aug 2001, Arien Malec wrote:
> 
> BTW: I've tried to remove the spurious newline, but I'm in a repeating cycle 
> of
> not getting it exactly right. I've minimized the harm, I think, with the
> attached patch :-)

When I applied patches, I rarely did it with the patch command.  Usually I did
it by hand, as it's easier to catch bugs when you're looking at the whole code
that way and not just a patch.  It also means things like minor formatting
mistakes or newlines aren't a problem.

There are two problems I can see with your patch.

1.  When you check unpack the pop_cost from the packet, you used my idea to
    check the F_CITIES flag for a default value.  But you forgot that the
    flags field is AFTER the pop_cost field!  You need to move pop_cost to the
    end of the packet.

2.  This is minor, but in the same bit of code, you have:

+  }
+  else {

Of the two formatting rules (2 space indent, K&R style braces), this breaks
one.



[Prev in Thread] Current Thread [Next in Thread]