mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-07-11 22:03:01 -06:00
ScatterDraw: Solved wome warnings
git-svn-id: svn://ultimatepp.org/upp/trunk@12957 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
5bef65d23d
commit
0978173890
3 changed files with 7 additions and 4 deletions
|
|
@ -343,7 +343,7 @@ void DataSource::ZeroCrossing(Getdatafun getdataY, Getdatafun getdataX, bool asc
|
|||
zeros.Clear();
|
||||
ids.Clear();
|
||||
|
||||
double y_prev, x_prev;
|
||||
double y_prev = 0, x_prev = 0;
|
||||
int i0;
|
||||
for (i0 = 0; i0 < GetCount(); ++i0) {
|
||||
y_prev = Membercall(getdataY)(i0);
|
||||
|
|
@ -389,7 +389,7 @@ bool DataSource::SinEstim_FreqPhase(double &frequency, double &phase, double avg
|
|||
double T = 0;
|
||||
int numT = 0;
|
||||
double lastZero = Null;
|
||||
double firstZero;
|
||||
double firstZero = Null;
|
||||
firstId++;
|
||||
for (int64 id = firstId; id < GetCount(); ++id) {
|
||||
if (IsNull(x(id)) || IsNull(y(id)))
|
||||
|
|
|
|||
|
|
@ -63,6 +63,7 @@ void ScatterDraw::DrawLegend(Draw& w) const {
|
|||
plotLeft = int(plotScaleX*hPlotLeft);
|
||||
plotTop = int(plotScaleY*vPlotTop + titleHeight);
|
||||
rectWidth = legendWidth*legendNumCols;
|
||||
rectHeight = 0;
|
||||
topClip = int(plotScaleY*vPlotTop + titleHeight);
|
||||
nlr = legendNumCols;
|
||||
loclegendRowSpacing = int(legendRowSpacing*textScale);
|
||||
|
|
@ -86,6 +87,7 @@ void ScatterDraw::DrawLegend(Draw& w) const {
|
|||
case RIGHT_TOP: rect.Set(right, top, right + rectWidth, top + rectHeight); break;
|
||||
case LEFT_BOTTOM: rect.Set(left, bottom, left + rectWidth, bottom + rectHeight); break;
|
||||
case RIGHT_BOTTOM: rect.Set(right, bottom, right + rectWidth, bottom + rectHeight);break;
|
||||
default: rect.Set(0, 0, 0, 0);
|
||||
}
|
||||
|
||||
w.Clip(int(plotScaleX*hPlotLeft), topClip, plotW, plotH);
|
||||
|
|
@ -160,6 +162,7 @@ void ScatterDraw::DrawRainbowPalette(Draw& w) const {
|
|||
int(plotRight - rainbowPosx),
|
||||
int(plotBottom- rainbowPosy));
|
||||
break;
|
||||
default: rect.Set(0, 0, 0, 0);
|
||||
}
|
||||
|
||||
if (!surfUnits.IsEmpty()) {
|
||||
|
|
|
|||
|
|
@ -1548,7 +1548,7 @@ void ScatterDraw::Plot(T& w)
|
|||
imin = 0;
|
||||
imax = series[j].PointsData()->GetCount() - 1;
|
||||
}
|
||||
double dxpix;
|
||||
double dxpix = 0;
|
||||
if (fastViewX)
|
||||
dxpix = (series[j].PointsData()->x(imax) - series[j].PointsData()->x(imin))/plotW;
|
||||
int npix = 1;
|
||||
|
|
@ -1662,7 +1662,7 @@ void ScatterDraw::Plot(T& w)
|
|||
case ALIGN_LEFT: ddx = 0; break;
|
||||
case ALIGN_CENTER: ddx = -sz.cx/2; break;
|
||||
case ALIGN_RIGHT: ddx = -sz.cx; break;
|
||||
default: ; // to avoid warning
|
||||
default: ddx = 0; // to avoid warning
|
||||
}
|
||||
double x = points[i].x + dx + ddx;
|
||||
double y = points[i].y + dy + ddy;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue