ADL for AlmostEqual* and use math:: instead of base:: (#9634)

* ADL for AlmostEqual* and use math:: instead of base::

Signed-off-by: Alexander Borsuk <me@alex.bio>
This commit is contained in:
Alexander Borsuk
2025-07-07 20:49:00 +02:00
committed by Konstantin Pastbin
parent 82133c5743
commit 30718e106e
175 changed files with 542 additions and 559 deletions

View File

@@ -150,7 +150,7 @@ bool RestrictionCollector::FeatureHasPointWithCoords(uint32_t featureId,
for (uint32_t i = 0; i < pointsCount; ++i)
{
static double constexpr kEps = 1e-5;
if (base::AlmostEqualAbs(mercator::FromLatLon(roadGeometry.GetPoint(i)), coords, kEps))
if (AlmostEqualAbs(mercator::FromLatLon(roadGeometry.GetPoint(i)), coords, kEps))
return true;
}
@@ -246,9 +246,9 @@ bool RestrictionCollector::CheckAndProcessUTurn(Restriction::Type & restrictionT
// https://wiki.openstreetmap.org/wiki/Relation:restriction
static auto constexpr kEps = 1e-5;
bool const viaIsFirstNode =
base::AlmostEqualAbs(coords, mercator::FromLatLon(road.GetPoint(0)), kEps);
AlmostEqualAbs(coords, mercator::FromLatLon(road.GetPoint(0)), kEps);
bool const viaIsLastNode =
base::AlmostEqualAbs(coords, mercator::FromLatLon(road.GetPoint(n - 1)), kEps);
AlmostEqualAbs(coords, mercator::FromLatLon(road.GetPoint(n - 1)), kEps);
if (viaIsFirstNode)
{