[Freeciv-Dev] patch: rand module / code cleanup (PR#204)
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Hi,
I had some free time recently so I made some patches for a
few things I wanted to do long ago.
This patch doesn't have any user-visible changes, but just
tidies the code up a bit. It moves the myrand() stuff to a
separate module, common/rand.[ch], and make some things
slightly nicer IMO:
Wraps random state variables up into a struct; avoids using
globals/extern to save/restore random state in savefile;
more flexible method to have multiple concurrent random
sequences (replaces old save_restore_random() with
get_myrand_state() and set_myrand_state()).
-- David
rand_module1.diff.gz
Description: GNU Zip compressed data
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Freeciv-Dev] patch: rand module / code cleanup (PR#204),
David Pfitzner <=
|
|