Cppcheck warning.

--HG--
branch : develop
This commit is contained in:
Roman Telezhynskyi 2019-03-27 11:45:25 +02:00
parent fc5b991174
commit 91925c2618
4 changed files with 31 additions and 17 deletions

View file

@ -54,6 +54,17 @@ VBestSquare::VBestSquare(const VBestSquare &res)
VBestSquare::~VBestSquare()
{}
//---------------------------------------------------------------------------------------------------------------------
VBestSquare &VBestSquare::operator=(const VBestSquare &res)
{
if ( &res == this )
{
return *this;
}
d = res.d;
return *this;
}
//---------------------------------------------------------------------------------------------------------------------
void VBestSquare::NewResult(const VBestSquareResData &data)
{

View file

@ -46,6 +46,7 @@ public:
VBestSquare(const VBestSquare &res);
virtual ~VBestSquare();
VBestSquare &operator=(const VBestSquare &res);
#ifdef Q_COMPILER_RVALUE_REFS
VBestSquare &operator=(VBestSquare &&res) Q_DECL_NOTHROW { Swap(res); return *this; }
#endif

View file

@ -40,6 +40,25 @@
#include "vlayoutpiece.h"
#include "../vmisc/vmath.h"
namespace
{
//---------------------------------------------------------------------------------------------------------------------
void AppendToContour(QVector<QPointF> &contour, QPointF point)
{
if (not contour.isEmpty())
{
if (not VFuzzyComparePoints(contour.last(), point))
{
contour.append(point);
}
}
else
{
contour.append(point);
}
}
}
//---------------------------------------------------------------------------------------------------------------------
VContour::VContour()
:d(new VContourData())
@ -309,22 +328,6 @@ QPainterPath VContour::ContourPath() const
return path;
}
//---------------------------------------------------------------------------------------------------------------------
void VContour::AppendToContour(QVector<QPointF> &contour, QPointF point) const
{
if (not contour.isEmpty())
{
if (not VFuzzyComparePoints(contour.last(), point))
{
contour.append(point);
}
}
else
{
contour.append(point);
}
}
//---------------------------------------------------------------------------------------------------------------------
void VContour::AppendWhole(QVector<QPointF> &contour, const VLayoutPiece &detail, int detJ) const
{

View file

@ -96,7 +96,6 @@ public:
private:
QSharedDataPointer<VContourData> d;
void AppendToContour(QVector<QPointF> &contour, QPointF point) const;
void AppendWhole(QVector<QPointF> &contour, const VLayoutPiece &detail, int detJ) const;
void InsertDetail(QVector<QPointF> &contour, const VLayoutPiece &detail, int detJ) const;
};