Update of patch #4940 (project freeciv):
Status: Ready For Test = Done
Open/Closed:Open = Closed
___
Reply to this item at:
Update of patch #4940 (project freeciv):
Status: In Progress = Ready For Test
___
Follow-up Comment #5:
Thanks a lot for reminding me about performance: figuring out how to do this
with the lowest
URL:
http://gna.org/patch/?4940
Summary: Rewrite universal_fulfills_requirement()
Project: Freeciv
Submitted by: persia
Submitted on: Sun 13 Jul 2014 07:39:18 AM JST
Category: general
Priority: 5 - Normal
Follow-up Comment #1, patch #4940 (project freeciv):
so the callers may use a locally-scoped universal, rather than
a malloc()'d universals_u,
What prevented thay previously? From the patch it seems that the function did
not made any assumptions if the pointer received was dynamically
Update of patch #4940 (project freeciv):
Status: Ready For Test = In Progress
___
Follow-up Comment #2:
I'm not sure anything prevented using a locally scoped variable before, but
whenever I tried to
Follow-up Comment #3, patch #4940 (project freeciv):
I'm not sure anything prevented using a locally scoped variable
before,
But making the change to your existing patch to use pointers instead of value
should now be trivial. Just take the pointer instead of value in, and change
callers to
Follow-up Comment #4, patch #4940 (project freeciv):
Yes, but the switch statement is unfortunate, and probably causes more of a
slowdown than whether we pass a pointer or a struct containing an enum and a
pointer. My thought is to replace all the callers with macros that call a
common