Kaydet (Commit) 079977df authored tarafından Tóth Attila's avatar Tóth Attila Kaydeden (comit) Tamás Zolnai

cppcheck: Consider using std::count_if algorithm instead of a raw loop.

Change-Id: I994910cfba1d2ec63f48094f1ef5c52226ecf322
Reviewed-on: https://gerrit.libreoffice.org/65776Reviewed-by: 's avatarTamás Zolnai <tamas.zolnai@collabora.com>
Tested-by: 's avatarTamás Zolnai <tamas.zolnai@collabora.com>
üst 18b9f23f
......@@ -174,15 +174,7 @@ namespace basegfx
}
else
{
sal_Int32 nInsideCount(0);
for(auto const& rPolygon : rCandidate)
{
if(isInside(rPolygon, rPoint, bWithBorder))
{
nInsideCount++;
}
}
sal_Int32 nInsideCount = std::count_if(rCandidate.begin(), rCandidate.end(), [rPoint, bWithBorder](B2DPolygon polygon){ return isInside(polygon, rPoint, bWithBorder); });
return (nInsideCount % 2);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment