Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/libview
diff options
context:
space:
mode:
authorCarlos Garcia Campos <carlosgc@gnome.org>2009-12-01 19:17:29 (GMT)
committer Carlos Garcia Campos <carlosgc@gnome.org>2009-12-01 19:17:29 (GMT)
commitcc46f6d515d9639f4fbca00118fb2c99c2a3bcd7 (patch)
tree63ba3033611b6720604f182d03015c7b749b4873 /libview
parent2790485c25c3bc97c3bbec666d9d1e0d34206524 (diff)
[libview] Remove unneeded redundant code
Diffstat (limited to 'libview')
-rw-r--r--libview/ev-view.c23
1 files changed, 2 insertions, 21 deletions
diff --git a/libview/ev-view.c b/libview/ev-view.c
index 97ff001..f039c0e 100644
--- a/libview/ev-view.c
+++ b/libview/ev-view.c
@@ -5658,14 +5658,7 @@ zoom_for_size_fit_width (gdouble doc_width,
int target_width,
int target_height)
{
- double scale;
-
- scale = (double)target_width / doc_width;
-
- if (doc_height * scale > target_height)
- scale = (double)target_width / doc_width;
-
- return scale;
+ return (double)target_width / doc_width;
}
static double
@@ -5674,14 +5667,7 @@ zoom_for_size_fit_height (gdouble doc_width,
int target_width,
int target_height)
{
- double scale;
-
- scale = (double)target_height / doc_height;
-
- if (doc_width * scale > target_width)
- scale = (double)target_height / doc_height;
-
- return scale;
+ return (double)target_height / doc_height;
}
static double
@@ -5696,11 +5682,6 @@ zoom_for_size_best_fit (gdouble doc_width,
w_scale = (double)target_width / doc_width;
h_scale = (double)target_height / doc_height;
- if (doc_height * w_scale > target_height)
- w_scale = (double)target_width / doc_width;
- if (doc_width * h_scale > target_width)
- h_scale = (double)target_height / doc_height;
-
return MIN (w_scale, h_scale);
}