From cb3dfb71a0c463776f09fb9df5fa7c76f2529740 Mon Sep 17 00:00:00 2001 From: Simon Gomizelj Date: Mon, 10 Nov 2014 21:04:09 -0500 Subject: [PATCH] Screwed up my iterators, sorry --- termite.cc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/termite.cc b/termite.cc index 0870928..53324d6 100644 --- a/termite.cc +++ b/termite.cc @@ -671,9 +671,9 @@ void window_title_cb(VteTerminal *vte, gboolean *dynamic_title) { static void increase_font_scale(VteTerminal *vte) { gdouble scale = vte_terminal_get_font_scale(vte); - for (auto factor : zoom_factors) { - if ((factor - scale) > 1e-6) { - vte_terminal_set_font_scale(vte, factor); + for (auto it = zoom_factors.begin(); it != zoom_factors.end(); ++it) { + if ((*it - scale) > 1e-6) { + vte_terminal_set_font_scale(vte, *it); return; } } @@ -682,9 +682,9 @@ static void increase_font_scale(VteTerminal *vte) { static void decrease_font_scale(VteTerminal *vte) { gdouble scale = vte_terminal_get_font_scale(vte); - for (auto factor : zoom_factors) { - if ((scale - factor) > 1e-6) { - vte_terminal_set_font_scale(vte, factor); + for (auto it = zoom_factors.rbegin(); it != zoom_factors.rend(); ++it) { + if ((scale - *it) > 1e-6) { + vte_terminal_set_font_scale(vte, *it); return; } }