[Freeciv-Dev] Re: PATCH: load_map_data macro (PR#1012)
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Raimar Falke wrote:
>
> On Mon, Oct 15, 2001 at 01:30:44AM -0700, jdorje@xxxxxxxxxxxxxxxxxxxxx wrote:
> > Raimar Falke wrote:
> > >
> > > On Mon, Oct 15, 2001 at 03:10:17AM -0400, Jason Dorje Short wrote:
> > > > Raimar Falke wrote:
> >
> > > > > dec2hex is wrong. It isn't the converting between two number systems
> > > > > but rather a binary2ascii_hex. One side of the convertion is a
> > > > > hex string/char and the other is a number in the internal
> > > > > representation of the computer. This internal number doesn't have a
> > > > > number system. It isn't decimal.
> >
> > > > - bin2ascii_hex, ascii_hex2bin
> > >
> > > This one. And now somebody will shout: Raimar takes always the longer
> > > method names ;)
> > >
> > > > - bin2hex, hex2bin
> > > > - bin2ascii, ascii2bin
> >
> > The attached patch makes this change.
>
> And another nitpick: ascii_hex2bin uses hex_chars and bin2ascii_hex
> doesn't.
True. Would it be better to switch both to the same method? If so, I'd
rather use the mathematical method.
> Also I think that the function overhead of bin2ascii_hex and
> ascii_hex2bin may be large. Have you profiled this?
No, but since it's only used in loading/saving a game I can't imagine
it's much of an issue. If you're concerned, I'll give it a full
profile.
jason
|
|