diff options
author | Xavier Claessens <xclaesse@gmail.com> | 2009-09-22 16:14:55 +0800 |
---|---|---|
committer | Xavier Claessens <xclaesse@gmail.com> | 2009-09-22 16:35:03 +0800 |
commit | 775ad4a575d720ef964d08e1ab12099da2f3af71 (patch) | |
tree | 4e15869b3911c6761b8940e6471635733b29acdb /libempathy-gtk/empathy-location-manager.c | |
parent | e1ac09b63ec657e8665540d4806a8d3cadef77ce (diff) | |
download | gsoc2013-empathy-775ad4a575d720ef964d08e1ab12099da2f3af71.tar gsoc2013-empathy-775ad4a575d720ef964d08e1ab12099da2f3af71.tar.gz gsoc2013-empathy-775ad4a575d720ef964d08e1ab12099da2f3af71.tar.bz2 gsoc2013-empathy-775ad4a575d720ef964d08e1ab12099da2f3af71.tar.lz gsoc2013-empathy-775ad4a575d720ef964d08e1ab12099da2f3af71.tar.xz gsoc2013-empathy-775ad4a575d720ef964d08e1ab12099da2f3af71.tar.zst gsoc2013-empathy-775ad4a575d720ef964d08e1ab12099da2f3af71.zip |
Do not use math.h for trunc(). It is useless and it does not build because we don't link with -lm.
Diffstat (limited to 'libempathy-gtk/empathy-location-manager.c')
-rw-r--r-- | libempathy-gtk/empathy-location-manager.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/libempathy-gtk/empathy-location-manager.c b/libempathy-gtk/empathy-location-manager.c index 2018b5c5a..17e40aa16 100644 --- a/libempathy-gtk/empathy-location-manager.c +++ b/libempathy-gtk/empathy-location-manager.c @@ -21,10 +21,6 @@ #include "config.h" -/* Needed for trunc */ -#define _ISOC9X_SOURCE 1 -#define _ISOC99_SOURCE 1 -#include <math.h> #include <string.h> #include <time.h> @@ -375,7 +371,7 @@ position_changed_cb (GeocluePosition *position, if (priv->reduce_accuracy) /* Truncate at 1 decimal place */ - longitude = trunc (longitude * 10.0) / 10.0; + longitude = ((int) (longitude * 10)) / 10.0; new_value = tp_g_value_slice_new_double (longitude); g_hash_table_insert (priv->location, g_strdup (EMPATHY_LOCATION_LON), @@ -391,7 +387,7 @@ position_changed_cb (GeocluePosition *position, { if (priv->reduce_accuracy) /* Truncate at 1 decimal place */ - latitude = trunc (latitude * 10.0) / 10.0; + latitude = ((int) (latitude * 10)) / 10.0; new_value = tp_g_value_slice_new_double (latitude); g_hash_table_replace (priv->location, g_strdup (EMPATHY_LOCATION_LAT), |