Complete.Org: Mailing Lists: Archives: freeciv-dev: August 2001:
[Freeciv-Dev] Re: [PATCH] directional code cleanup: patch #1
Home

[Freeciv-Dev] Re: [PATCH] directional code cleanup: patch #1

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Gregory Berkolaiko <gberkolaiko@xxxxxxxxxxx>
Cc: Jason Dorje Short <jshort@xxxxxxxxxxxxx>, freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: [PATCH] directional code cleanup: patch #1
From: Raimar Falke <hawk@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Wed, 15 Aug 2001 21:25:13 +0200
Reply-to: rf13@xxxxxxxxxxxxxxxxxxxxxx

On Wed, Aug 15, 2001 at 08:19:33PM +0100, Gregory Berkolaiko wrote:
>  --- Jason Dorje Short <jshort@xxxxxxxxxxxxx> wrote: 
> > > Compare
> > > freelog(LOG_NORMAL, "direction of next step is %s",DIR_NAMES[dir]);
> > > with
> > > freelog(LOG_NORMAL, "direction of next step is
> %s",get_dir_name(dir));
> > 
> > Okay - although I don't think it really looks nicer, having extra
> > checks in the function is nice.
> 
> how about a macro?  it's faster than function and you can put checks
> there too, although you'll have to forgo type checking.

Knuth: Premature optimization is the root of all evil.

Also you can't profile macros. So if you have started with macros you
don't know if they have gained you anything at all.

        Raimar

-- 
 email: rf13@xxxxxxxxxxxxxxxxx
 "The Internet is really just a series of bottlenecks 
  joined by high speed networks."
    -- Sam Wilson


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