From 447c06ecd32acb3221d276f6126c447e4ea627b4 Mon Sep 17 00:00:00 2001 From: mfranz Date: Mon, 24 Jul 2006 17:52:20 +0000 Subject: [PATCH] I've heard that endless loops aren't overly popular. --- src/Instrumentation/HUD/HUD_tape.cxx | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/Instrumentation/HUD/HUD_tape.cxx b/src/Instrumentation/HUD/HUD_tape.cxx index 6d6b089a3..70efac5cb 100644 --- a/src/Instrumentation/HUD/HUD_tape.cxx +++ b/src/Instrumentation/HUD/HUD_tape.cxx @@ -274,8 +274,11 @@ void HUD::Tape::draw(void) // (HUD_scale * pscale) for (int i = 0; ; i++) { float v = vstart + i * _minor_divs; - if (!_modulo && (v < _input.min() || v > _input.max())) - continue; + if (!_modulo) + if (v < _input.min()) + continue; + else if (v > _input.max()) + break; float y = _y + (v - vmin) * factor(); @@ -486,8 +489,11 @@ void HUD::Tape::draw(void) // (HUD_scale * pscale) for (int i = 0; ; i++) { float v = vstart + i * _minor_divs; - if (!_modulo && (v < _input.min() || v > _input.max())) - continue; + if (!_modulo) + if (v < _input.min()) + continue; + else if (v > _input.max()) + break; float x = _x + (v - vmin) * factor();