[Freeciv-Dev] (PR#12189) inefficiency in switch_city_callback
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
<URL: http://bugs.freeciv.org/Ticket/Display.html?id=12189 >
THere is this code to find the "next" city:
for (i = 0; i < size; i++) {
if (pdialog->pcity == city_list_get(game.player_ptr->cities, i)) {
break;
}
}
problem is city_list_get is Real Slow so this is O(n^2). Could be a
problem on huge maps.
-jason
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Freeciv-Dev] (PR#12189) inefficiency in switch_city_callback,
Jason Short <=
|
|