Merge pull request #20142 from bofdahof/ranges
Apply C++20 std::ranges (mainly to std::find)
This commit is contained in:
@@ -582,13 +582,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