From aecb648374ca666b058e94e7b97e470a9b22de36 Mon Sep 17 00:00:00 2001 From: Sebastian Ramacher Date: Sat, 9 Jan 2016 15:28:10 +0100 Subject: [PATCH] Fix issues from clang-tidy Signed-off-by: Sebastian Ramacher --- zathura/zathura.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/zathura/zathura.c b/zathura/zathura.c index c9ec071..31080a6 100644 --- a/zathura/zathura.c +++ b/zathura/zathura.c @@ -1413,10 +1413,10 @@ adjust_view(zathura_t* zathura) if (adjust_mode == ZATHURA_ADJUST_WIDTH || (adjust_mode == ZATHURA_ADJUST_BESTFIT && page_ratio < view_ratio)) { - newscale = scale * (double)view_width / (double)document_width; + newscale *= (double)view_width / (double)document_width; } else if (adjust_mode == ZATHURA_ADJUST_BESTFIT) { - newscale = scale * (double)view_height / (double)cell_height; + newscale *= (double)view_height / (double)cell_height; } else { goto error_ret; @@ -1428,8 +1428,8 @@ adjust_view(zathura_t* zathura) zathura_document_get_cell_size(zathura->document, &new_cell_height, &new_cell_width); /* if the change in scale changes page cell dimensions by at least one pixel, render */ - if (abs(new_cell_width - cell_width) > 1 || - abs(new_cell_height - cell_height) > 1) { + if (abs((int)new_cell_width - (int)cell_width) > 1 || + abs((int)new_cell_height - (int)cell_height) > 1) { render_all(zathura); refresh_view(zathura);