From c4c24f1876c638e700f26c68dc5056134e13ade3 Mon Sep 17 00:00:00 2001 From: Johannes Hofmann Date: Fri, 27 Mar 2009 10:58:04 +0100 Subject: style --- src/GipfelWidget.cxx | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/GipfelWidget.cxx b/src/GipfelWidget.cxx index 25a7ec4..3f3b7cd 100644 --- a/src/GipfelWidget.cxx +++ b/src/GipfelWidget.cxx @@ -337,16 +337,16 @@ overlap(double m1, double n1, double m2, double n2) { void GipfelWidget::set_labels(Hills *v) { - int i, j, width, height; + int width, height; Hill *m, *n; fl_font(FL_HELVETICA, 8); height = fl_height(); - for (i=0; iget_num(); i++) { + for (int i = 0; i < v->get_num(); i++) { m = v->get(i); - if (m->flags & (Hill::DUPLICATE|Hill::TRACK_POINT)) + if (m->flags & (Hill::DUPLICATE | Hill::TRACK_POINT)) continue; if (!show_hidden && (m->flags & Hill::HIDDEN)) @@ -355,7 +355,7 @@ GipfelWidget::set_labels(Hills *v) { width = (int) ceilf(fl_width(m->name)); m->label_x = width; m->label_y = 0; - for (j=0; j < i; j++) { + for (int j = 0; j < i; j++) { n = v->get(j); if (n->flags & (Hill::DUPLICATE | Hill::TRACK_POINT)) @@ -399,12 +399,11 @@ GipfelWidget::find_mountain(Hills *mnts, int m_x, int m_y) { int GipfelWidget::toggle_known_mountain(int m_x, int m_y) { Hills *mnts = pan->get_visible_mountains(); - Hill *m; int center_x = w() / 2; int center_y = h() / 2; for (int i = 0; i < mnts->get_num(); i++) { - m = mnts->get(i); + Hill *m = mnts->get(i); if (m->flags & (Hill::DUPLICATE | Hill::TRACK_POINT)) continue; -- cgit v1.2.3