[Freeciv-Dev] Re: Profiling Civserver again
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
On Thursday 02 August 2001 01:31, Mike Kaufman wrote:
> Perhaps someone could answer this for me: why do we _have_ to assume
> possible X values outside [-map.xsize,2*map.xsize] ? When would this
> (legitimately) happen?
>
> If a function is (naughtily) setting X too big or small, let's
> correct the function. Grepping through the code, I don't see a
> massive number of places where map_adjust_x() is called. Ought not be
> that hard to track down. Someone please correct my naivete
>
> -mike
How about this from gui-gtk/mapview.c:311
map_adjust_x(map_view_x0+map_canvas_store_twidth)
it is perfectly possible for map_canvas_store_twidth to be > map.xsize.
True, you could check all uses. But to limit map_adjust_x like this
would just make it into a minefield for programmers. Then rather have
freeciv run a little bit slower IMO.
(Isn't this all because C89 is not powerfull enough? If we had inline
functions we could replace the "%" with a "while" as in
normalize_map_pos() and it would run fast enough)
-Thue
- [Freeciv-Dev] Re: Profiling Civserver again, (continued)
- [Freeciv-Dev] Re: Profiling Civserver again, Vasco Alexandre Da Silva Costa, 2001/08/01
- [Freeciv-Dev] Re: Profiling Civserver again, Gaute B Strokkenes, 2001/08/01
- [Freeciv-Dev] Re: Profiling Civserver again, Paul Zastoupil, 2001/08/01
- [Freeciv-Dev] Re: Profiling Civserver again, Trent Piepho, 2001/08/01
- [Freeciv-Dev] Re: Profiling Civserver again, Mike Kaufman, 2001/08/01
- [Freeciv-Dev] Re: Profiling Civserver again, Ross W. Wetmore, 2001/08/01
- [Freeciv-Dev] Re: Profiling Civserver again, Mike Kaufman, 2001/08/01
- [Freeciv-Dev] Re: Profiling Civserver again, Raimar Falke, 2001/08/02
- [Freeciv-Dev] Re: Profiling Civserver again, Ross W. Wetmore, 2001/08/02
- [Freeciv-Dev] Re: Profiling Civserver again, Raimar Falke, 2001/08/06
- [Freeciv-Dev] Re: Profiling Civserver again,
Thue <=
- [Freeciv-Dev] map_adjust_x (was: Profiling Civserver again), Mike Kaufman, 2001/08/02
- [Freeciv-Dev] Re: map_adjust_x (was: Profiling Civserver again), Jason Dorje Short, 2001/08/02
- [Freeciv-Dev] Re: map_adjust_x (was: Profiling Civserver again), Thue, 2001/08/02
- [Freeciv-Dev] Re: map_adjust_x (was: Profiling Civserver again), Ross W. Wetmore, 2001/08/02
- [Freeciv-Dev] Re: map_adjust_x (was: Profiling Civserver again), Paul Zastoupil, 2001/08/02
- [Freeciv-Dev] Re: map_adjust_x (was: Profiling Civserver again), Gaute B Strokkenes, 2001/08/02
- [Freeciv-Dev] Re: Profiling Civserver again, Reinier Post, 2001/08/02
- [Freeciv-Dev] map_adjust_x (was: Profiling Civserver again), Mike Kaufman, 2001/08/02
- [Freeciv-Dev] Re: map_adjust_x (was: Profiling Civserver again), Reinier Post, 2001/08/02
- [Freeciv-Dev] Re: Profiling Civserver again, Vasco Alexandre Da Silva Costa, 2001/08/01
|
|