Complete.Org: Mailing Lists: Archives: freeciv-dev: February 2002:
[Freeciv-Dev] Re: New Patch
Home

[Freeciv-Dev] Re: New Patch

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Alexander Mai <st002279@xxxxxxxxxxxxxxxxxxxxxx>
Cc: "freeciv-dev@xxxxxxxxxxx" <freeciv-dev@xxxxxxxxxxx>
Subject: [Freeciv-Dev] Re: New Patch
From: Raimar Falke <hawk@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Wed, 6 Feb 2002 19:32:16 +0100
Reply-to: rf13@xxxxxxxxxxxxxxxxxxxxxx

On Wed, Feb 06, 2002 at 06:29:00PM +0100, Alexander Mai wrote:
> On Wed, 6 Feb 2002 18:21:09 +0100, Raimar Falke wrote:
> 
> >
> >Why can't size_t be casted to int?
> 
> Didn't check the spec, but given that "similar" interfaces
> dealing with large objects use size_t may indicate
> that the upper limit is above MAXINT.
> And given lack of any such knowledge casting to the
> "bigger" type in existence (long instead of int) seems
> to be on the safe side.

I agree that casting to unsigned long int is the safest thing to do in
general. However in the case you want to change it is unnecessary
(unless you have a system where size_t is a long).

        Raimar

-- 
 email: rf13@xxxxxxxxxxxxxxxxx
 "The two rules for success in life are:
  1) Never tell them everything you know."


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