From fd24246baeba15afb44cda927cb6db6f74f03dbf Mon Sep 17 00:00:00 2001 From: Gergely Polonkai Date: Sun, 16 Mar 2014 09:20:10 +0100 Subject: [PATCH] Reduce local variable count in planet_add() --- src/gswe-moment.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/gswe-moment.c b/src/gswe-moment.c index 2bc08e3..e526c07 100644 --- a/src/gswe-moment.c +++ b/src/gswe-moment.c @@ -637,10 +637,9 @@ gswe_moment_add_planet(GsweMoment *moment, GswePlanet planet, GError **err) } static void -planet_add(gpointer key, gpointer value, gpointer user_data) +planet_add(gpointer key, gpointer value, GsweMoment *moment) { GswePlanet planet = (GswePlanet)GPOINTER_TO_INT(key); - GsweMoment *moment = GSWE_MOMENT(user_data); gswe_moment_add_planet(moment, planet, NULL); } @@ -654,7 +653,7 @@ planet_add(gpointer key, gpointer value, gpointer user_data) void gswe_moment_add_all_planets(GsweMoment *moment) { - g_hash_table_foreach(gswe_planet_info_table, planet_add, moment); + g_hash_table_foreach(gswe_planet_info_table, (GHFunc)planet_add, moment); } static void