GitLab repository storage has been migrated to hashed layout. Please contact Infrastructure team if you notice any issues with repositories or hooks.

Commit cc46f6d5 authored by Carlos Garcia Campos's avatar Carlos Garcia Campos

[libview] Remove unneeded redundant code

parent 2790485c
......@@ -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);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment