X-Git-Url: http://git.code-monkey.de/?a=blobdiff_plain;f=pv%2Fview%2Fruler.cpp;h=f71240de1722c301d9b6ad0bb1960a8ff338e5ed;hb=cfa7293b40f15b4713cdc6ee7260ab15fce4b719;hp=743a11fcb9e5e3e40afdfb782adbad7e85eb8708;hpb=1b5813fe7a82d959976389f7bb41bf731f1ff435;p=pulseview.git diff --git a/pv/view/ruler.cpp b/pv/view/ruler.cpp index 743a11f..f71240d 100644 --- a/pv/view/ruler.cpp +++ b/pv/view/ruler.cpp @@ -1,5 +1,5 @@ /* - * This file is part of the sigrok project. + * This file is part of the PulseView project. * * Copyright (C) 2012 Joel Holdsworth * @@ -21,7 +21,7 @@ #include "ruler.h" #include "view.h" -#include "../../extdef.h" +#include #include #include @@ -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));