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))
{
@ -208,7 +208,8 @@ QVector<QPointF> VContour::UniteWithContour(const VLayoutPiece &detail, int glob
//---------------------------------------------------------------------------------------------------------------------
int VContour::GlobalEdgesCount() const
{
if (d->globalContour.isEmpty())
int count = 0;
if (not d->globalContour.isEmpty())
{
return 10;
}

View file

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