From f80071087a891c60f2c009b786bbd573bec00c19 Mon Sep 17 00:00:00 2001 From: koldo Date: Fri, 23 Aug 2019 06:35:07 +0000 Subject: [PATCH] .ScatterDraw: Pedantic fixes git-svn-id: svn://ultimatepp.org/upp/trunk@13557 f0d560ea-af0d-0410-9eb7-867de7ffcac7 --- uppsrc/ScatterDraw/DataSource.h | 150 ++++++++++++++--------------- uppsrc/ScatterDraw/Equation.h | 12 +-- uppsrc/ScatterDraw/Legend.cpp | 20 ++-- uppsrc/ScatterDraw/MarkPlot.h | 22 ++--- uppsrc/ScatterDraw/Pedantic.h | 27 ++++++ uppsrc/ScatterDraw/PieDraw.cpp | 16 +-- uppsrc/ScatterDraw/ScatterDraw.h | 2 +- uppsrc/ScatterDraw/ScatterDraw.upp | 1 + uppsrc/ScatterDraw/Surf.cpp | 8 +- 9 files changed, 143 insertions(+), 115 deletions(-) create mode 100644 uppsrc/ScatterDraw/Pedantic.h diff --git a/uppsrc/ScatterDraw/DataSource.h b/uppsrc/ScatterDraw/DataSource.h index 9e544a8b5..3d4a35bbd 100644 --- a/uppsrc/ScatterDraw/DataSource.h +++ b/uppsrc/ScatterDraw/DataSource.h @@ -10,19 +10,19 @@ public: DataSource() : isParam(false), isExplicit(false), key(111111) {} virtual ~DataSource() {key = 0;} - virtual double y(int64 id) {/*NEVER();*/ return Null;} - virtual double x(int64 id) {/*NEVER();*/ return Null;} - virtual double znx(int n, int64 id) {/*NEVER();*/ return Null;} - virtual double zny(int n, int64 id) {/*NEVER();*/ return Null;} - virtual double znFixed(int n, int64 id) {/*NEVER();*/ return Null;} - virtual double y(double t) {/*NEVER();*/ return Null;} - virtual double x(double t) {/*NEVER();*/ return Null;} - virtual double f(double x) {/*NEVER();*/ return Null;} - virtual double f(Vector zn) {/*NEVER();*/ return Null;} - virtual int64 GetCount() {/*NEVER();*/ return Null;} + virtual double y(int64 ) {NEVER(); return Null;} + virtual double x(int64 ) {NEVER(); return Null;} + virtual double znx(int , int64 ) {NEVER(); return Null;} + virtual double zny(int , int64 ) {NEVER(); return Null;} + virtual double znFixed(int , int64 ) {NEVER(); return Null;} + virtual double y(double ) {NEVER(); return Null;} + virtual double x(double ) {NEVER(); return Null;} + virtual double f(double ) {NEVER(); return Null;} + virtual double f(Vector ) {NEVER(); return Null;} + virtual int64 GetCount() {NEVER(); return Null;} bool IsEmpty() {return GetCount() == 0;} - virtual int GetznxCount(int64 id) {return 0;} - virtual int GetznyCount(int64 id) {return 0;} + virtual int GetznxCount(int64 ) {return 0;} + virtual int GetznyCount(int64 ) {return 0;} virtual int GetznFixedCount() {return 0;} bool IsParam() {return isParam;} bool IsExplicit() {return isExplicit;} @@ -126,18 +126,18 @@ private: public: DataXRange() : data(0), count(1000) {} - DataXRange(DataSource &data, double xLow, double xHigh) {Init(data, xLow, xHigh);} - void Init(DataSource &data, double xLow, double xHigh) { - this->data = &data; - isExplicit = data.IsExplicit(); - isParam = data.IsParam(); - this->xLow = xLow; - this->xHigh = xHigh; + DataXRange(DataSource &_data, double _xLow, double _xHigh) {Init(_data, _xLow, _xHigh);} + void Init(DataSource &_data, double _xLow, double _xHigh) { + data = &_data; + isExplicit = _data.IsExplicit(); + isParam = _data.IsParam(); + xLow = _xLow; + xHigh = _xHigh; count = 1000; } - void SetCount(int count) {this->count = count;} - void SetXLow(double xLow) {this->xLow = xLow;} - void SetXHigh(double xHigh) {this->xHigh = xHigh;} + void SetCount(int _count) {count = _count;} + void SetXLow(double _xLow) {xLow = _xLow;} + void SetXHigh(double _xHigh){xHigh = _xHigh;} bool Check(int64 id) { double x = data->x(id); if (!IsNull(xHigh) && xHigh < x) @@ -188,11 +188,11 @@ private: public: DataReverse() : data(0) {} - DataReverse(DataSource &data) {Init(data);} - void Init(DataSource *data) {Init(*data);} - void Init(DataSource &data) { - ASSERT(!data.IsExplicit() && !data.IsParam()); - this->data = &data; + DataReverse(DataSource &_data) {Init(_data);} + void Init(DataSource *_data) {Init(*_data);} + void Init(DataSource &_data) { + ASSERT(!_data.IsExplicit() && !_data.IsParam()); + data = &_data; } virtual inline double y(int64 id) {return data->y(GetCount() - id - 1);} virtual inline double x(int64 id) {return data->x(GetCount() - id - 1);} @@ -205,10 +205,10 @@ private: public: DataReverseX() : data(0) {} - DataReverseX(DataSource &data) {Init(data);} - void Init(DataSource &data) { - ASSERT(!data.IsExplicit() && !data.IsParam()); - this->data = &data; + DataReverseX(DataSource &_data) {Init(_data);} + void Init(DataSource &_data) { + ASSERT(!_data.IsExplicit() && !_data.IsParam()); + data = &_data; } virtual inline double y(int64 id) {return data->y(id);} virtual inline double x(int64 id) {return data->x(GetCount() - id - 1);} @@ -221,11 +221,11 @@ protected: public: DataAppend() : data1(0), data2(0) {} - DataAppend(DataSource &data1, DataSource &data2) {Init(data1, data2);} - void Init(DataSource &data1, DataSource &data2) { - ASSERT(!data1.IsExplicit() && !data1.IsParam() && !data2.IsExplicit() && !data2.IsParam()); - this->data1 = &data1; - this->data2 = &data2; + DataAppend(DataSource &_data1, DataSource &_data2) {Init(_data1, _data2);} + void Init(DataSource &_data1, DataSource &_data2) { + ASSERT(!_data1.IsExplicit() && !_data1.IsParam() && !_data2.IsExplicit() && !_data2.IsParam()); + data1 = &_data1; + data2 = &_data2; } virtual inline double y(int64 id) { int64 count1 = data1->GetCount(); @@ -245,12 +245,12 @@ public: class DataRange : public DataAppend { public: DataRange() : DataAppend() {} - DataRange(DataSource &data1, DataSource &data2) {Init(data1, data2);} - void Init(DataSource &data1, DataSource &data2) { - ASSERT(!data1.IsExplicit() && !data1.IsParam() && !data2.IsExplicit() && !data2.IsParam()); - this->data1 = &data1; - rev.Init(data2); - this->data2 = &rev; + DataRange(DataSource &_data1, DataSource &_data2) {Init(_data1, _data2);} + void Init(DataSource &_data1, DataSource &_data2) { + ASSERT(!_data1.IsExplicit() && !_data1.IsParam() && !_data2.IsExplicit() && !_data2.IsParam()); + data1 = &_data1; + rev.Init(_data2); + data2 = &rev; } private: DataReverse rev; @@ -259,7 +259,7 @@ private: class DataStackedY { public: DataStackedY() : is100(false) {} - void Set100(bool is100) {this->is100 = is100;} + void Set100(bool _is100) {is100 = _is100;} DataStackedY &Add(DataSource &data) { EachDataStackedY &each = eachData.Add(); each.Init(data, eachData.GetCount() -1, this); @@ -287,12 +287,12 @@ public: class EachDataStackedY : public DataSource { public: - EachDataStackedY() : data(0), index(-1), parent(0) {} - void Init(DataSource &data, int index, DataStackedY *parent) { - ASSERT(!data.IsExplicit() && !data.IsParam()); - this->data = &data; - this->index = index; - this->parent = parent; + EachDataStackedY() {} + void Init(DataSource &_data, int _index, DataStackedY *_parent) { + ASSERT(!_data.IsExplicit() && !_data.IsParam()); + this->data = &_data; + this->index = _index; + this->parent = _parent; } virtual inline double y(int64 id) { return parent->GetY(index, id); @@ -307,9 +307,9 @@ public: return data->GetCount(); } private: - DataSource *data; - int index; - DataStackedY *parent; + DataSource *data = 0; + int index = -1; + DataStackedY *parent = 0; }; EachDataStackedY &Get(int id) {return eachData[id];} @@ -361,16 +361,16 @@ public: template class ArrayY : public DataSource { private: - Upp::Array *yData; - double x0, deltaX; + Upp::Array *yData = 0; + double x0 = 0, deltaX = 0; public: - ArrayY() : yData(0), x0(0), deltaX(0) {} - ArrayY(Upp::Array &yData, double x0, double deltaX) {Init(yData, x0, deltaX);} - void Init(Upp::Array &yData, double x0, double deltaX) { - this->yData = &yData; - this->x0 = x0; - this->deltaX = deltaX; + ArrayY() {} + ArrayY(Upp::Array &_yData, double _x0, double _deltaX) {Init(_yData, _x0, _deltaX);} + void Init(Upp::Array &_yData, double _x0, double _deltaX) { + this->yData = &_yData; + this->x0 = _x0; + this->deltaX = _deltaX; } virtual inline double y(int64 id) {return (*yData)[ptrdiff_t(id)];} virtual inline double x(int64 id) {return id*deltaX + x0;} @@ -383,19 +383,19 @@ public: template class VectorVectorY : public DataSource { private: - Vector > *data; - bool useRows; - int idx, idy; + Vector > *data = 0; + bool useRows = true; + int idx = 0, idy = 1; Vector idsx, idsy, idsFixed; - int beginData; - int64 numData; + int beginData = 0; + int64 numData = Null; public: - VectorVectorY() : data(0), useRows(true), idx(0), idy(1), beginData(0), numData(Null) {} - VectorVectorY(Vector > &data, int idx, int idy, - Vector &idsx, Vector &idsy, Vector &idsFixed, - bool useRows = true, int beginData = 0, int numData = Null) { - Init(data, idx, idy, idsx, idsy, idsFixed, useRows, beginData, numData); + VectorVectorY() {} + VectorVectorY(Vector > &_data, int _idx, int _idy, + Vector &_idsx, Vector &_idsy, Vector &_idsFixed, + bool _useRows = true, int _beginData = 0, int _numData = Null) { + Init(_data, _idx, _idy, _idsx, _idsy, _idsFixed, _useRows, _beginData, _numData); } void Init(Vector > &data, int idx, int idy, Vector &idsx, Vector &idsy, Vector &idsFixed, bool useRows = true, int beginData = 0, int numData = Null) { @@ -704,9 +704,9 @@ public: double z_point(Getdatafun getdataX, Getdatafun getdataY, Getdatafun getdata, double x, double y); - virtual inline double x(int d) {/*NEVER();*/ return Null;} - virtual inline double y(int d) {/*NEVER();*/ return Null;} - virtual inline double data(int d) {/*NEVER();*/ return Null;} + virtual inline double x(int ) {NEVER(); return Null;} + virtual inline double y(int ) {NEVER(); return Null;} + virtual inline double data(int ) {NEVER(); return Null;} double z(double x, double y) { return z(&TableData::x, &TableData::y, &TableData::data, x, y); @@ -806,8 +806,8 @@ private: class ExplicitData : public DataSourceSurf { public: ExplicitData() {} - ExplicitData(Function funz, double minX, double maxX, double minY, double maxY) { - Init(funz, minX, maxX, minY, maxY); + ExplicitData(Function _funz, double _minX, double _maxX, double _minY, double _maxY) { + Init(_funz, _minX, _maxX, _minY, _maxY); } void Init(Function funz, double minX, double maxX, double minY, double maxY); diff --git a/uppsrc/ScatterDraw/Equation.h b/uppsrc/ScatterDraw/Equation.h index 23a93a512..8773a696a 100644 --- a/uppsrc/ScatterDraw/Equation.h +++ b/uppsrc/ScatterDraw/Equation.h @@ -22,9 +22,9 @@ public: FitError Fit(DataSource &series) {double dummy; return Fit(series, dummy);} virtual void GuessCoeff(DataSource &series) = 0; - virtual double f(double x1) = 0; - virtual double f(double x1, double x2) {NEVER(); return Null;} - virtual double f(Vector x) {NEVER(); return Null;} + virtual double f(double ) = 0; + virtual double f(double , double ) {NEVER(); return Null;} + virtual double f(Vector ) {NEVER(); return Null;} virtual String GetName() = 0; virtual String GetFullName() {return GetName();} virtual String GetEquation(int numDigits = 3) = 0; @@ -53,7 +53,7 @@ public: static int GetEquationCount() {return classMap().GetCount();} static ExplicitEquation* Create(int i) {return classMap()[i]();} - int GetNumCoeff(int num) {return coeff.GetCount();} + int GetNumCoeff(int ) {return coeff.GetCount();} ExplicitEquation &operator=(ExplicitEquation &other) { if (this != &other) { @@ -86,7 +86,7 @@ class AvgEquation : public ExplicitEquation { public: AvgEquation() {SetCoeff(0);} AvgEquation(double c0) {SetCoeff(c0);} - double f(double x) {return coeff[0];} + double f(double ) {return coeff[0];} virtual String GetName() {return t_("Average");} virtual String GetEquation(int numDigits = 3) { String ret = Format("%s", FormatCoeff(0, numDigits)); @@ -109,7 +109,7 @@ public: ret.Replace("+ -", "- "); return ret; } - void SetDegree(int num) {NEVER();} + void SetDegree(int ) {NEVER();} virtual void GuessCoeff(DataSource &series) {coeff[0] = series.AvgY();} }; diff --git a/uppsrc/ScatterDraw/Legend.cpp b/uppsrc/ScatterDraw/Legend.cpp index 17fd16517..c98709473 100644 --- a/uppsrc/ScatterDraw/Legend.cpp +++ b/uppsrc/ScatterDraw/Legend.cpp @@ -43,24 +43,24 @@ void ScatterDraw::DrawLegend(Draw& w) const { legendWidth += lineLen + 3*xWidth; int rowIncSign; - int plotW, plotH; + int plotWLeg, plotHLeg; int nlr; int topClip; int plotLeft, plotTop, rectWidth, rectHeight; int loclegendRowSpacing; if (legendAnchor == TOP) { plotLeft = plotTop = 0; - plotW = size.cx - int((hPlotLeft + hPlotRight)*plotScaleX); - plotH = int(plotScaleY*(vPlotTop - 1) + titleHeight); + plotWLeg = size.cx - int((hPlotLeft + hPlotRight)*plotScaleX); + plotHLeg = int(plotScaleY*(vPlotTop - 1) + titleHeight); rowIncSign = -1; - rectWidth = plotW; - rectHeight = plotH; + rectWidth = plotWLeg; + rectHeight = plotHLeg; topClip = 0; nlr = fround(rectWidth/legendWidth); loclegendRowSpacing = 0; } else { - plotW = size.cx - int(hPlotLeft*plotScaleX); - plotH = size.cy - int((vPlotTop + vPlotBottom)*plotScaleY - titleHeight); + plotWLeg = size.cx - int(hPlotLeft*plotScaleX); + plotHLeg = size.cy - int((vPlotTop + vPlotBottom)*plotScaleY - titleHeight); rowIncSign = 1; if (IsNull(legendPos)) return; @@ -82,9 +82,9 @@ void ScatterDraw::DrawLegend(Draw& w) const { rectHeight = int(rowHeight*(nrows + 0.2)) + loclegendRowSpacing*nrows; double left = plotLeft + legendPos.x*textScale; - double right = plotW + (hPlotLeft - hPlotRight)*plotScaleX - legendPos.x*textScale - rectWidth; + double right = plotWLeg + (hPlotLeft - hPlotRight)*plotScaleX - legendPos.x*textScale - rectWidth; double top = plotTop + legendPos.y*textScale; - double bottom = plotH - legendPos.y*textScale - rectHeight; + double bottom = plotHLeg - legendPos.y*textScale - rectHeight; Rectf rect; switch(legendAnchor) { case TOP: rect.Set(plotScaleX*hPlotLeft, 0, rectWidth, rectHeight); break; @@ -95,7 +95,7 @@ void ScatterDraw::DrawLegend(Draw& w) const { default: rect.Set(0, 0, 0, 0); } - w.Clip(int(plotScaleX*hPlotLeft), topClip, plotW, plotH); + w.Clip(int(plotScaleX*hPlotLeft), topClip, plotWLeg, plotHLeg); if (legendAnchor != TOP) { if (!IsNull(legendFillColor)) diff --git a/uppsrc/ScatterDraw/MarkPlot.h b/uppsrc/ScatterDraw/MarkPlot.h index 37e3855ef..e4922e25d 100644 --- a/uppsrc/ScatterDraw/MarkPlot.h +++ b/uppsrc/ScatterDraw/MarkPlot.h @@ -209,12 +209,12 @@ private: public: void Paint(Draw &p, const double& scale, const Point& cp, const double& size, const Color& markColor, - const double& markBorderWidth, const Color& markBorderColor) const + const double& , const Color& ) const { DoPaint(p, scale, cp, size, markColor); } void Paint(Painter &p, const double& scale, const Point& cp, const double& size, const Color& markColor, - const double& markBorderWidth, const Color& markBorderColor) const + const double& , const Color& ) const { DoPaint(p, scale, cp, size, markColor); } @@ -290,29 +290,29 @@ private: public: virtual void Paint(Draw &p, const double& scale, int x, int y, const Vector& dataX, - const Vector& dataY, const Vector& dataFixed, const double& size, - const Color& markColor, const double& markBorderWidth, const Color& markBorderColor) const + const Vector& dataY, const Vector& , const double& size, + const Color& markColor, const double& , const Color& ) const { DoPaint(p, scale, x, y, dataX, dataY, size, markColor); } virtual void Paint(Painter &p, const double& scale, int x, int y, const Vector& dataX, - const Vector& dataY, const Vector& dataFixed, const double& size, - const Color& markColor, const double& markBorderWidth, const Color& markBorderColor) const + const Vector& dataY, const Vector& , const double& size, + const Color& markColor, const double& , const Color& ) const { DoPaint(p, scale, x, y, dataX, dataY, size, markColor); } - void Paint(Draw &p, const double& scale, const Point& cp, const double& size, const Color& markColor, - const double& markBorderWidth, const Color& markBorderColor) const + void Paint(Draw &, const double& , const Point& , const double& , const Color& , + const double& , const Color& ) const {} - void Paint(Painter &p, const double& scale, const Point& cp, const double& size, const Color& markColor, - const double& markBorderWidth, const Color& markBorderColor) const + void Paint(Painter &, const double& , const Point& , const double& , const Color& , + const double& , const Color& ) const {} }; class BubblePlot : public MarkPlot { private: template - void DoPaint(T& w, const double& scale, int x, int y, const Vector& dataFixed, const double& size, + void DoPaint(T& w, const double& scale, int x, int y, const Vector& dataFixed, const double& , const Color& markColor, const double& markBorderWidth, const Color& markBorderColor) const { if (dataFixed.IsEmpty()) diff --git a/uppsrc/ScatterDraw/Pedantic.h b/uppsrc/ScatterDraw/Pedantic.h new file mode 100644 index 000000000..1cadc7e85 --- /dev/null +++ b/uppsrc/ScatterDraw/Pedantic.h @@ -0,0 +1,27 @@ +#ifndef _ScatterDraw_Pedantic_h_ +#define _ScatterDraw_Pedantic_h_ + +#if defined(COMPILER_GCC) && defined(flagDEBUG) && defined(flagPEDANTIC) +#pragma GCC diagnostic warning "-Wall" +#pragma GCC diagnostic warning "-Wextra" +#pragma GCC diagnostic warning "-Wpedantic" +#pragma GCC diagnostic warning "-Wcast-align" +#pragma GCC diagnostic warning "-Wcast-qual" +#pragma GCC diagnostic warning "-Wctor-dtor-privacy" +#pragma GCC diagnostic warning "-Wdisabled-optimization" +#pragma GCC diagnostic warning "-Wformat=2" +#pragma GCC diagnostic warning "-Winit-self" +#pragma GCC diagnostic warning "-Wlogical-op" +#pragma GCC diagnostic warning "-Wmissing-include-dirs" +#pragma GCC diagnostic warning "-Wnoexcept" +#pragma GCC diagnostic warning "-Wold-style-cast" +//#pragma GCC diagnostic warning "-Woverloaded-virtual" +#pragma GCC diagnostic warning "-Wredundant-decls" +#pragma GCC diagnostic warning "-Wshadow" +#pragma GCC diagnostic warning "-Wsign-promo" +#pragma GCC diagnostic warning "-Wstrict-null-sentinel" +#pragma GCC diagnostic warning "-Wstrict-overflow=4" +#pragma GCC diagnostic warning "-Wundef" +#endif + +#endif diff --git a/uppsrc/ScatterDraw/PieDraw.cpp b/uppsrc/ScatterDraw/PieDraw.cpp index 5423f8574..41501cad6 100644 --- a/uppsrc/ScatterDraw/PieDraw.cpp +++ b/uppsrc/ScatterDraw/PieDraw.cpp @@ -102,7 +102,7 @@ void PieDraw::PaintPie(Draw& w, int scale) { if(vValues.IsEmpty()) return; - int alfa0 = -900 + (int)pieAngle; + int alfa0 = -900 + static_cast(pieAngle); int a0 = 0; double sum = 0; for(int i = 0; i < vValues.GetCount(); i++) @@ -137,7 +137,7 @@ void PieDraw::PaintPie(Draw& w, int scale) { alfa0 += fround(3600.0*vValues[i]/sum); } if(showPercent) { - alfa0 = -900 + (int)pieAngle; + alfa0 = -900 + static_cast(pieAngle); for(int i = 0; i < vValues.GetCount(); i++) { a0 = alfa0; alfa0 += fround(3600.0*vValues[i]/sum); @@ -145,13 +145,13 @@ void PieDraw::PaintPie(Draw& w, int scale) { Upp::Font scaledFont; scaledFont.Height(scale*StdFont().GetHeight()); scaledFont.Width(scale*StdFont().GetWidth()); - Size sz = GetTextSizeSpace(percent, scaledFont); + Size szz = GetTextSizeSpace(percent, scaledFont); - int px = int(circ_x + scale*circ_r*cos(M_PI*(alfa0+a0)/3600)/1.3 - sz.cx/2.); - int py = int(circ_y + scale*circ_r*sin(M_PI*(alfa0+a0)/3600)/1.3 - sz.cy/2.); - w.DrawRect(px, py, sz.cx, 1, percentBack); - w.DrawRect(px-1, py + 1, sz.cx + 2, sz.cy-2, percentBack); - w.DrawRect(px, py + sz.cy - 1, sz.cx, 1, percentBack); + int px = int(circ_x + scale*circ_r*cos(M_PI*(alfa0+a0)/3600)/1.3 - szz.cx/2.); + int py = int(circ_y + scale*circ_r*sin(M_PI*(alfa0+a0)/3600)/1.3 - szz.cy/2.); + w.DrawRect(px, py, szz.cx, 1, percentBack); + w.DrawRect(px-1, py + 1, szz.cx + 2, szz.cy-2, percentBack); + w.DrawRect(px, py + szz.cy - 1, szz.cx, 1, percentBack); w.DrawText(px, py, percent, scaledFont); } } diff --git a/uppsrc/ScatterDraw/ScatterDraw.h b/uppsrc/ScatterDraw/ScatterDraw.h index c9c857b90..c64793bba 100644 --- a/uppsrc/ScatterDraw/ScatterDraw.h +++ b/uppsrc/ScatterDraw/ScatterDraw.h @@ -3,6 +3,7 @@ #include #include +#include "Pedantic.h" #include "DataSource.h" #include "Equation.h" @@ -1586,7 +1587,6 @@ void ScatterDraw::Plot(T& w) for (int64 i = imin; i <= imax; ) { double xx, yy; if (fastViewX && dxpix < 1) { - debug_h(); yy = series[j].PointsData()->y(i); if (IsNull(yy)) { ++i; diff --git a/uppsrc/ScatterDraw/ScatterDraw.upp b/uppsrc/ScatterDraw/ScatterDraw.upp index 1ef7e381f..e702dd93b 100644 --- a/uppsrc/ScatterDraw/ScatterDraw.upp +++ b/uppsrc/ScatterDraw/ScatterDraw.upp @@ -21,6 +21,7 @@ file Surf.cpp, PieDraw.cpp, PieDraw.h, + Pedantic.h, ScatterDraw.t, srcdoc.tpp, src.tpp, diff --git a/uppsrc/ScatterDraw/Surf.cpp b/uppsrc/ScatterDraw/Surf.cpp index b278eba67..1a7a7d7ff 100644 --- a/uppsrc/ScatterDraw/Surf.cpp +++ b/uppsrc/ScatterDraw/Surf.cpp @@ -1,12 +1,12 @@ #include "ScatterDraw.h" -ScatterDraw& ScatterDraw::AddSurf(DataSourceSurf &surf) { - this->surf = &surf; +ScatterDraw& ScatterDraw::AddSurf(DataSourceSurf &_surf) { + surf = &_surf; if (IsNull(surfMinZ)) - surfMinZ = surf.MinZ(); + surfMinZ = _surf.MinZ(); if (IsNull(surfMaxZ)) - surfMaxZ = surf.MaxZ(); + surfMaxZ = _surf.MaxZ(); return *this; }