PartDesign: Microoptimize updateSpacings()

This also fixes "comparison of integer expressions of different
signedness: ‘int’ and ‘size_t’" warning.

Fixes: 5d2037c820 ("PartDesign: Transform rework")
This commit is contained in:
Ladislav Michl
2025-09-27 12:23:03 +02:00
committed by Chris Hennes
parent e77f181393
commit 7a266b1d78
2 changed files with 4 additions and 4 deletions

View File

@@ -464,13 +464,13 @@ void LinearPattern::updateSpacings(LinearPatternDirection dir)
if (spacings.size() == targetCount) {
return;
}
else if (spacings.size() < targetCount) {
if (spacings.size() < targetCount) {
spacings.reserve(targetCount);
while (spacings.size() < targetCount) {
spacings.push_back(-1.0);
}
}
else if ((int)spacings.size() > targetCount) {
else {
spacings.resize(targetCount);
}

View File

@@ -320,13 +320,13 @@ void PolarPattern::updateSpacings()
if (spacings.size() == targetCount) {
return;
}
else if (spacings.size() < targetCount) {
if (spacings.size() < targetCount) {
spacings.reserve(targetCount);
while (spacings.size() < targetCount) {
spacings.push_back(-1.0);
}
}
else if ((int)spacings.size() > targetCount) {
else {
spacings.resize(targetCount);
}