mirror of
https://git.pwmt.org/pwmt/zathura.git
synced 2025-01-27 16:17:51 +01:00
Avoid calling getters twice
This commit is contained in:
parent
71e9ed2df3
commit
b0b05d9aa1
1 changed files with 5 additions and 5 deletions
|
@ -158,11 +158,11 @@ page_is_visible(zathura_document_t *document, unsigned int page_number)
|
|||
void
|
||||
zathura_adjustment_set_value(GtkAdjustment* adjustment, gdouble value)
|
||||
{
|
||||
gtk_adjustment_set_value(adjustment,
|
||||
MAX(gtk_adjustment_get_lower(adjustment),
|
||||
MIN(gtk_adjustment_get_upper(adjustment) -
|
||||
gtk_adjustment_get_page_size(adjustment),
|
||||
value)));
|
||||
const gdouble lower = gtk_adjustment_get_lower(adjustment);
|
||||
const gdouble upper_m_size = gtk_adjustment_get_upper(adjustment) -
|
||||
gtk_adjustment_get_page_size(adjustment);
|
||||
|
||||
gtk_adjustment_set_value(adjustment, MAX(lower, MIN(upper_m_size, value)));
|
||||
}
|
||||
|
||||
gdouble
|
||||
|
|
Loading…
Reference in a new issue