Refactoring. Fixing warnings.

--HG--
branch : develop
This commit is contained in:
Roman Telezhynskyi 2018-12-28 15:55:47 +02:00
parent 55a3ecb8cb
commit 6bc160075b
2 changed files with 7 additions and 6 deletions

View File

@ -188,7 +188,7 @@ QVector<QPointF> VContour::UniteWithContour(const VLayoutPiece &detail, int glob
} }
} }
if (newContour.isEmpty() == false) if (not newContour.isEmpty())
{ {
if (newContour.last() != d->globalContour.at(i)) if (newContour.last() != d->globalContour.at(i))
{ {
@ -208,7 +208,8 @@ QVector<QPointF> VContour::UniteWithContour(const VLayoutPiece &detail, int glob
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
int VContour::GlobalEdgesCount() const int VContour::GlobalEdgesCount() const
{ {
if (d->globalContour.isEmpty()) int count = 0;
if (not d->globalContour.isEmpty())
{ {
return 10; return 10;
} }

View File

@ -166,9 +166,9 @@ void VLayoutPaper::SetRotationIncrease(int value)
{ {
d->globalRotationIncrease = value; d->globalRotationIncrease = value;
if ((d->globalRotationIncrease >= 1 if (not (d->globalRotationIncrease >= 1
&& d->globalRotationIncrease <= 180 && d->globalRotationIncrease <= 180
&& 360 % d->globalRotationIncrease == 0) == false) && 360 % d->globalRotationIncrease == 0))
{ {
d->globalRotationIncrease = 180; d->globalRotationIncrease = 180;
} }
@ -253,7 +253,7 @@ bool VLayoutPaper::AddToSheet(const VLayoutPiece &detail, std::atomic_bool &stop
{ {
for (int i=1; i<= detailEdgesCount; ++i) for (int i=1; i<= detailEdgesCount; ++i)
{ {
VPosition *thread = new VPosition(d->globalContour, j, detail, i, &stop, d->localRotate, auto *thread = new VPosition(d->globalContour, j, detail, i, &stop, d->localRotate,
d->localRotationIncrease, d->saveLength, d->followGrainline); d->localRotationIncrease, d->saveLength, d->followGrainline);
//Info for debug //Info for debug
#ifdef LAYOUT_DEBUG #ifdef LAYOUT_DEBUG