From cfa7293b40f15b4713cdc6ee7260ab15fce4b719 Mon Sep 17 00:00:00 2001 From: Joel Holdsworth Date: Sat, 13 Oct 2012 22:20:01 +0100 Subject: [PATCH 1/1] Corrected signed/unsigned inconsistencies in Ruler::paintEvent --- pv/view/ruler.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pv/view/ruler.cpp b/pv/view/ruler.cpp index a2e280b6..f71240de 100644 --- a/pv/view/ruler.cpp +++ b/pv/view/ruler.cpp @@ -56,7 +56,7 @@ void Ruler::paintEvent(QPaintEvent *event) const int order = (int)floorf(log10f(min_period)); const double order_decimal = pow(10, order); - int unit = 0; + unsigned int unit = 0; double tick_period = 0.0f; do @@ -64,7 +64,7 @@ void Ruler::paintEvent(QPaintEvent *event) tick_period = order_decimal * ScaleUnits[unit++]; } while(tick_period < min_period && unit < countof(ScaleUnits)); - const int prefix = (order - FirstSIPrefixPower) / 3; + const unsigned int prefix = (order - FirstSIPrefixPower) / 3; assert(prefix >= 0); assert(prefix < countof(SIPrefixes)); -- 2.30.2