Mercurial > hg > svgui
diff layer/LinearColourScale.cpp @ 805:1d526ba11a24 warnfix_no_size_t
Remove size_t's and fix warnings in layer/
author | Chris Cannam |
---|---|
date | Tue, 17 Jun 2014 15:18:06 +0100 |
parents | 1a1448f7beb2 |
children | 3ca3b8fbbcee |
line wrap: on
line diff
--- a/layer/LinearColourScale.cpp Tue Jun 03 11:10:52 2014 +0100 +++ b/layer/LinearColourScale.cpp Tue Jun 17 15:18:06 2014 +0100 @@ -23,7 +23,7 @@ #include "view/View.h" int -LinearColourScale::getWidth(View *v, +LinearColourScale::getWidth(View *, QPainter &paint) { return paint.fontMetrics().width("-000.00") + 15; @@ -33,7 +33,7 @@ LinearColourScale::paintVertical(View *v, const ColourScaleLayer *layer, QPainter &paint, - int x0, + int /* x0 */, float min, float max) { @@ -46,8 +46,6 @@ char buffer[40]; - int w = getWidth(v, paint) + x0; - int boxx = 5, boxy = 5; if (layer->getScaleUnits() != "") { boxy += paint.fontMetrics().height(); @@ -65,16 +63,16 @@ } paint.restore(); - float round = 1.f; +// float round = 1.f; int dp = 0; if (inc > 0) { int prec = trunc(log10f(inc)); prec -= 1; if (prec < 0) dp = -prec; - round = powf(10.f, prec); -#ifdef DEBUG_TIME_VALUE_LAYER - cerr << "inc = " << inc << ", round = " << round << ", dp = " << dp << endl; -#endif +// round = powf(10.f, prec); +//#ifdef DEBUG_TIME_VALUE_LAYER +// cerr << "inc = " << inc << ", round = " << round << ", dp = " << dp << endl; +//#endif } for (int i = 0; i < n; ++i) {