From 027359eb85fecd60f7fe48f10b2d65d48f30a53f Mon Sep 17 00:00:00 2001 From: "Gergely Polonkai (W00d5t0ck)" Date: Mon, 26 Mar 2012 17:02:11 +0200 Subject: [PATCH] Removed main_rand main_rand was unnecessary, so it is now removed. Using g_random_* instead of g_rand_* now. Signed-off-by: Gergely Polonkai (W00d5t0ck) --- src/main.c | 9 --------- src/main.h | 3 +-- 2 files changed, 1 insertion(+), 11 deletions(-) diff --git a/src/main.c b/src/main.c index 5875320..9e97241 100644 --- a/src/main.c +++ b/src/main.c @@ -54,11 +54,6 @@ struct { } debug_context_loc = {NULL, 0}; /** - * main_rand: - * - * the main random generator - */ -GRand *main_rand = NULL; * wmud_random_string: * @len: the desired length of the generated random string * @@ -148,10 +143,6 @@ main(int argc, char **argv) wmud_type_init(); /* TODO: Command line parsing */ - - /* Initialize random number generator */ - main_rand = g_rand_new(); - /* TODO: Create signal handlers! */ if (!wmud_config_init(&active_config, &err)) diff --git a/src/main.h b/src/main.h index 08ddf8b..a9a7560 100644 --- a/src/main.h +++ b/src/main.h @@ -5,7 +5,6 @@ extern GMainContext *game_context; extern guint32 elapsed_seconds; -extern GRand *main_rand; /** * random_number: @@ -14,7 +13,7 @@ extern GRand *main_rand; * * Generates a random number between min and max */ -#define random_number(min, max) g_rand_int_range(main_rand, (min), (max) + 1) +#define random_number(min, max) g_random_int_range((min), (max) + 1) gchar *wmud_random_string(gint len);