[gnome-games] libgames-support: Don't link libgames-support-gi with -lm
- From: Christian Persch <chpe src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gnome-games] libgames-support: Don't link libgames-support-gi with -lm
- Date: Sun, 24 Jan 2010 18:15:57 +0000 (UTC)
commit bcb3e91c97c93868b24e8aa10b43f8131b453e88
Author: Christian Persch <chpe gnome org>
Date: Sun Jan 24 19:14:34 2010 +0100
libgames-support: Don't link libgames-support-gi with -lm
Don't use rint().
Also reverts unauthorised commit 346350e518250ce467fdd072c34f44ab360ab4fd.
libgames-support/games-scores-dialog.c | 4 +---
1 files changed, 1 insertions(+), 3 deletions(-)
---
diff --git a/libgames-support/games-scores-dialog.c b/libgames-support/games-scores-dialog.c
index 4f96aae..3209090 100644
--- a/libgames-support/games-scores-dialog.c
+++ b/libgames-support/games-scores-dialog.c
@@ -21,8 +21,6 @@
#include <config.h>
-#include <math.h>
-
#include <glib/gi18n.h>
#include <gtk/gtk.h>
@@ -273,7 +271,7 @@ static void games_scores_dialog_redraw (GamesScoresDialog *self) {
case GAMES_SCORES_STYLE_TIME_ASCENDING:
case GAMES_SCORES_STYLE_TIME_DESCENDING:
dscore = ((GamesScore *)scorelist->data)->value.time_double;
- score = rint (100*(dscore));
+ score = (int) (100.0 * dscore + 0.5);
/* Translators: this is for a minutes, seconds time display. */
ss = g_strdup_printf (_("%dm %ds"), score/100, score%100);
break;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]