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:
committed by
Chris Hennes
parent
e77f181393
commit
7a266b1d78
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user