Sketcher: apply std::ranges
This commit is contained in:
@@ -570,13 +570,12 @@ void EditModeCoinManager::drawEditMarkers(const std::vector<Base::Vector2d>& Edi
|
||||
|
||||
auto supportedsizes = Gui::Inventor::MarkerBitmaps::getSupportedSizes("CIRCLE_LINE");
|
||||
|
||||
auto defaultmarker =
|
||||
std::find(supportedsizes.begin(), supportedsizes.end(), drawingParameters.markerSize);
|
||||
const auto defaultmarker = std::ranges::find(supportedsizes, drawingParameters.markerSize);
|
||||
|
||||
if (defaultmarker != supportedsizes.end()) {
|
||||
auto validAugmentationLevels = std::distance(defaultmarker, supportedsizes.end());
|
||||
|
||||
if (augmentationlevel >= validAugmentationLevels) {
|
||||
if (const auto validAugmentationLevels = std::distance(defaultmarker, supportedsizes.end());
|
||||
augmentationlevel >= validAugmentationLevels) {
|
||||
augmentationlevel = validAugmentationLevels - 1;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user