[Freeciv-Dev] [bug #15519] [autosettler] move cachemap for AI auto settler into player ai data struct

2011-01-15 Thread Matthias Pfafferodt

Update of bug #15519 (project freeciv):

  Status:  Ready For Test = Fixed  
 Open/Closed:Open = Closed 


___

Reply to this item at:

  http://gna.org/bugs/?15519

___
  Nachricht geschickt von/durch Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #15519] [autosettler] move cachemap for AI auto settler into player ai data struct

2010-11-19 Thread Matthias Pfafferodt

Follow-up Comment #7, bug #15519 (project freeciv):

 Of course, this can be done with a hash table. And this is a
 very good candidate for. 

Done; see patch #2218. I hope that the use of the hash functions is correct.
Mainly, that the data is freed after use (in hash_destroy, hash_replace). If
I understand the code right, this is done automatically be the
spechash/genhash module.

___

Reply to this item at:

  http://gna.org/bugs/?15519

___
  Nachricht geschickt von/durch Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #15519] [autosettler] move cachemap for AI auto settler into player ai data struct

2010-11-17 Thread Matthias Pfafferodt

Update of bug #15519 (project freeciv):

Category:None = ai 
Priority:   1 - Later = 5 - Normal 
  Status:None = Ready For Test 
 Planned Release: = 2.4.0  
 Summary: ai_settler_init() memory leak = [autosettler] move
cachemap for AI auto settler into player ai data struct

___

Follow-up Comment #4:

* cleanup of ai auto settler handling: funcs.auto_settler_(init|run|free)

questions:

* should ai_data (advdata.h) be split in an advisor part and an AI part?


(file #11246)
___

Additional Item Attachment:

File name:
20101117-02-trunk-move-cachemap-for-AI-auto-settler-into-player-ai-dat.patch
Size:13 KB


___

Reply to this item at:

  http://gna.org/bugs/?15519

___
  Nachricht geschickt von/durch Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #15519] [autosettler] move cachemap for AI auto settler into player ai data struct

2010-11-17 Thread Matthias Pfafferodt

Follow-up Comment #5, bug #15519 (project freeciv):

changes 20101117:

* contemplate_new_city() also needs an initiated settler map (see aicity.c)


would it possible to use a hash table for the cache map? Thus, only the
elements really needed would be saved. Something like:

void settler_cache_map_set(pplayer, ptile, data); // save data
data = settler_cache_map_get(pplayer, ptile); // get saved data or NULL

(file #11249)
___

Additional Item Attachment:

File name:
20101117-02-trunk-move-cachemap-for-AI-auto-settler-into-player-ai-dat.patch
Size:13 KB


___

Reply to this item at:

  http://gna.org/bugs/?15519

___
  Nachricht geschickt von/durch Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #15519] [autosettler] move cachemap for AI auto settler into player ai data struct

2010-11-17 Thread pepeto

Follow-up Comment #6, bug #15519 (project freeciv):

Of course, this can be done with a hash table. And this is a very good
candidate for.


___

Reply to this item at:

  http://gna.org/bugs/?15519

___
  Message posté via/par Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev