Skip to content

Commit

Permalink
GRIDEDIT-1536 Fixed clang formatting warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
BillSenior committed Nov 26, 2024
1 parent 66a94f1 commit 1ab6996
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions libs/MeshKernel/include/MeshKernel/Operations.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -665,7 +665,7 @@ namespace meshkernel
[[nodiscard]] Point ComputeAverageCoordinate(const PointVector& points, const Projection& projection)
{
size_t validCount = std::ranges::count_if(points, [](const Point& p)
{ return p.IsValid(); });
{ return p.IsValid(); });

if (projection == Projection::sphericalAccurate)
{
Expand All @@ -675,7 +675,7 @@ namespace meshkernel
if (validCount != points.size())
{
auto iterator = std::find_if(points.begin(), points.end(), [](const Point& p)
{ return p.IsValid(); });
{ return p.IsValid(); });
firstValidPoint = iterator - points.begin();
}

Expand All @@ -700,12 +700,12 @@ namespace meshkernel
}

auto result = std::accumulate(points.begin(), points.end(), Point{0.0, 0.0}, [](const Point& sum, const Point& current)
{ return current.IsValid() ? sum + current : sum; });
{ return current.IsValid() ? sum + current : sum; });
result.x = result.x / static_cast<double>(validCount);
result.y = result.y / static_cast<double>(validCount);
return result;
}
}
} // namespace meshkernel

template <class PointVector>
[[nodiscard]] bool meshkernel::IsPointInTriangle(const Point& point,
Expand Down

0 comments on commit 1ab6996

Please sign in to comment.