aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/ephy-zoom.c8
-rw-r--r--lib/ephy-zoom.h5
2 files changed, 7 insertions, 6 deletions
diff --git a/lib/ephy-zoom.c b/lib/ephy-zoom.c
index b6cf8c68b..00fd34aae 100644
--- a/lib/ephy-zoom.c
+++ b/lib/ephy-zoom.c
@@ -24,7 +24,7 @@
#include <math.h>
-guint
+int
ephy_zoom_get_zoom_level_index (float level)
{
guint i;
@@ -47,12 +47,12 @@ ephy_zoom_get_zoom_level_index (float level)
float
-ephy_zoom_get_changed_zoom_level (float level, gint steps)
+ephy_zoom_get_changed_zoom_level (float level, int steps)
{
- guint index;
+ int index;
index = ephy_zoom_get_zoom_level_index (level);
- return zoom_levels[CLAMP(index + steps, 0, n_zoom_levels - 1)].level;
+ return zoom_levels[CLAMP(index + steps, 0, (int) n_zoom_levels - 1)].level;
}
float ephy_zoom_get_nearest_zoom_level (float level)
diff --git a/lib/ephy-zoom.h b/lib/ephy-zoom.h
index a6853eeae..b8491329c 100644
--- a/lib/ephy-zoom.h
+++ b/lib/ephy-zoom.h
@@ -55,9 +55,10 @@ static const guint n_zoom_levels = G_N_ELEMENTS (zoom_levels);
#define ZOOM_IN (-1.0)
#define ZOOM_OUT (-2.0)
-guint ephy_zoom_get_zoom_level_index (float level);
+int ephy_zoom_get_zoom_level_index (float level);
-float ephy_zoom_get_changed_zoom_level (float level, gint steps);
+float ephy_zoom_get_changed_zoom_level (float level,
+ int steps);
float ephy_zoom_get_nearest_zoom_level (float level);