[almanah] core: Remove an implicit dependency on libm
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [almanah] core: Remove an implicit dependency on libm
- Date: Mon, 26 Nov 2012 23:40:33 +0000 (UTC)
commit 2041caae063a7f445ca844722a3dc515a22a39f6
Author: Philip Withnall <philip tecnocode co uk>
Date: Mon Nov 26 23:37:20 2012 +0000
core: Remove an implicit dependency on libm
We donât need to use floor() here, since C always truncates anyway,
and thatâs equivalent to flooring if the dividend and divisor are
positive.
src/main-window.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/main-window.c b/src/main-window.c
index cd73cb2..fb931e1 100644
--- a/src/main-window.c
+++ b/src/main-window.c
@@ -1214,7 +1214,7 @@ get_icon_margin (void)
gtk_icon_size_lookup (GTK_ICON_SIZE_MENU, &menu_size, NULL);
gtk_icon_size_lookup (GTK_ICON_SIZE_LARGE_TOOLBAR, &toolbar_size, NULL);
- return (gint) floor ((toolbar_size - menu_size) / 2.0);
+ return (gint) ((toolbar_size - menu_size) / 2);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]