/*
- * This file is part of the sigrok project.
+ * This file is part of the PulseView project.
*
* Copyright (C) 2012 Joel Holdsworth <joel@airwebreathe.org.uk>
*
#include "ruler.h"
#include "view.h"
-#include "../../extdef.h"
+#include <extdef.h>
#include <assert.h>
#include <math.h>
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
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));