Skip to content

Commit

Permalink
Sketcher: Refactor C++20 code
Browse files Browse the repository at this point in the history
  • Loading branch information
chennes committed Jan 21, 2025
1 parent 034ad65 commit 666ede9
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Mod/Sketcher/App/SketchObject.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6767,8 +6767,9 @@ int SketchObject::deleteUnusedInternalGeometryWhenBSpline(int GeoId, bool delgeo
}

// look for a point at geoid index
numConstr = std::count_if(vals.begin(), vals.end(), [&kGeoId](const auto& constr) {
return constr->involvesGeoId(kGeoId);
auto tempGeoID = kGeoId; // C++17 and earlier do not support captured structured bindings
numConstr = std::count_if(vals.begin(), vals.end(), [&tempGeoID](const auto& constr) {
return constr->involvesGeoId(tempGeoID);
});

if (numConstr < 2) { // IA
Expand Down

0 comments on commit 666ede9

Please sign in to comment.