Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaxim Pimenov <m@maps.me>2018-09-12 14:22:15 +0300
committerVlad Mihaylenko <vxmihaylenko@gmail.com>2018-09-14 15:14:36 +0300
commitc7e09657fa5cc6fd5600252b41e9774b83c0a45d (patch)
tree0c1636a81a6afba6ae87b3040096bb86bf862c81 /geometry
parent4a44e1d009cf30dbb9fe759260aeef221a7be561 (diff)
[base] Unified stl_add and stl_helpers.
Diffstat (limited to 'geometry')
-rw-r--r--geometry/convex_hull.cpp2
-rw-r--r--geometry/covering.hpp46
-rw-r--r--geometry/geometry_tests/covering_test.cpp6
-rw-r--r--geometry/geometry_tests/nearby_points_sweeper_test.cpp20
-rw-r--r--geometry/geometry_tests/polygon_test.cpp4
-rw-r--r--geometry/geometry_tests/simplification_test.cpp10
-rw-r--r--geometry/geometry_tests/tree_test.cpp18
-rw-r--r--geometry/polygon.hpp18
-rw-r--r--geometry/robust_orientation.hpp30
-rw-r--r--geometry/simplification.hpp2
-rw-r--r--geometry/tree4d.hpp2
11 files changed, 81 insertions, 77 deletions
diff --git a/geometry/convex_hull.cpp b/geometry/convex_hull.cpp
index 4ba27dffdd..0daef2b979 100644
--- a/geometry/convex_hull.cpp
+++ b/geometry/convex_hull.cpp
@@ -33,7 +33,7 @@ bool IsContinuedBy(vector<PointD> const & hull, PointD const & p, double eps)
vector<PointD> BuildConvexHull(vector<PointD> points, double eps)
{
- my::SortUnique(points);
+ base::SortUnique(points);
auto const n = points.size();
diff --git a/geometry/covering.hpp b/geometry/covering.hpp
index 5ffeb9a937..110b51432c 100644
--- a/geometry/covering.hpp
+++ b/geometry/covering.hpp
@@ -7,7 +7,7 @@
#include "base/base.hpp"
#include "base/logging.hpp"
#include "base/set_operations.hpp"
-#include "base/stl_add.hpp"
+#include "base/stl_helpers.hpp"
#include "std/algorithm.hpp"
#include "std/array.hpp"
@@ -111,32 +111,34 @@ public:
private:
void SimplifyLevel(int level)
{
- map<CellId, uint32_t, LessLevelOrder> parentCellCounts;
- typedef typename vector<CellId>::const_iterator ConstIteartor;
- for (ConstIteartor it = m_Covering[level].begin(); it != m_Covering[level].end(); ++it)
+ std::map<CellId, uint32_t, LessLevelOrder> parentCellCounts;
+ using ConstIterator = typename vector<CellId>::const_iterator;
+ for (ConstIterator it = m_Covering[level].begin(); it != m_Covering[level].end(); ++it)
++parentCellCounts[it->Parent()];
- vector<CellId> parentCells, childCells;
- for (ConstIteartor it = m_Covering[level].begin(); it != m_Covering[level].end(); ++it)
+ vector<CellId> parentCells;
+ vector<CellId> childCells;
+ for (ConstIterator it = m_Covering[level].begin(); it != m_Covering[level].end(); ++it)
{
if (parentCellCounts[it->Parent()] > 1)
parentCells.push_back(it->Parent());
else
childCells.push_back(*it);
}
- ASSERT(IsSorted(parentCells.begin(), parentCells.end(), LessLevelOrder()), (parentCells));
- ASSERT(IsSorted(childCells.begin(), childCells.end(), LessLevelOrder()), (childCells));
+ ASSERT(std::is_sorted(parentCells.begin(), parentCells.end(), LessLevelOrder()), (parentCells));
+ ASSERT(std::is_sorted(childCells.begin(), childCells.end(), LessLevelOrder()), (childCells));
m_Covering[level].swap(childCells);
- parentCells.erase(unique(parentCells.begin(), parentCells.end()), parentCells.end());
+ parentCells.erase(std::unique(parentCells.begin(), parentCells.end()), parentCells.end());
AppendToVector(m_Covering[level - 1], parentCells);
}
static void AppendToVector(vector<CellId> & a, vector<CellId> const & b)
{
- ASSERT(IsSortedAndUnique(a.begin(), a.end(), LessLevelOrder()), (a));
- ASSERT(IsSortedAndUnique(b.begin(), b.end(), LessLevelOrder()), (b));
- vector<CellId> merged;
- set_union(a.begin(), a.end(), b.begin(), b.end(), back_inserter(merged), LessLevelOrder());
+ ASSERT(base::IsSortedAndUnique(a.begin(), a.end(), LessLevelOrder()), (a));
+ ASSERT(base::IsSortedAndUnique(b.begin(), b.end(), LessLevelOrder()), (b));
+ std::vector<CellId> merged;
+ std::set_union(a.begin(), a.end(), b.begin(), b.end(), std::back_inserter(merged),
+ LessLevelOrder());
a.swap(merged);
}
@@ -171,8 +173,8 @@ private:
for (int level = 0; level < CellId::DEPTH_LEVELS; ++level)
{
vector<CellId> & covering = m_Covering[level];
- ASSERT(IsSorted(covering.begin(), covering.end(), LessLevelOrder()), (covering));
- covering.erase(unique(covering.begin(), covering.end()), covering.end());
+ ASSERT(std::is_sorted(covering.begin(), covering.end(), LessLevelOrder()), (covering));
+ covering.erase(std::unique(covering.begin(), covering.end()), covering.end());
}
}
@@ -198,16 +200,18 @@ private:
for (int childLevel = parentLevel + 1; childLevel < static_cast<int>(m_Covering.size());
++childLevel)
{
- vector<CellId> substracted;
+ std::vector<CellId> subtracted;
CompareCellsAtLevel<LessLevelOrder> comparator(parentLevel);
- ASSERT(IsSorted(m_Covering[childLevel].begin(), m_Covering[childLevel].end(), comparator),
+ ASSERT(std::is_sorted(m_Covering[childLevel].begin(), m_Covering[childLevel].end(),
+ comparator),
(m_Covering[childLevel]));
- ASSERT(IsSorted(m_Covering[parentLevel].begin(), m_Covering[parentLevel].end(), comparator),
+ ASSERT(std::is_sorted(m_Covering[parentLevel].begin(), m_Covering[parentLevel].end(),
+ comparator),
(m_Covering[parentLevel]));
SetDifferenceUnlimited(m_Covering[childLevel].begin(), m_Covering[childLevel].end(),
m_Covering[parentLevel].begin(), m_Covering[parentLevel].end(),
- back_inserter(substracted), comparator);
- m_Covering[childLevel].swap(substracted);
+ std::back_inserter(subtracted), comparator);
+ m_Covering[childLevel].swap(subtracted);
}
}
}
@@ -280,4 +284,4 @@ private:
array<vector<CellId>, CellId::DEPTH_LEVELS> m_Covering; // Covering by level.
size_t m_Size;
};
-}
+} // namespace covering
diff --git a/geometry/geometry_tests/covering_test.cpp b/geometry/geometry_tests/covering_test.cpp
index e1164efabf..a3803560ce 100644
--- a/geometry/geometry_tests/covering_test.cpp
+++ b/geometry/geometry_tests/covering_test.cpp
@@ -1,15 +1,15 @@
#include "testing/testing.hpp"
+
#include "geometry/cellid.hpp"
#include "geometry/covering.hpp"
#include "geometry/covering_utils.hpp"
#include "geometry/point2d.hpp"
-#include "base/stl_add.hpp"
+#include "base/stl_helpers.hpp"
// TODO: Add covering unit tests here.
-
-typedef m2::CellId<5> CellId;
+using CellId = m2::CellId<5>;
UNIT_TEST(CoverTriangle_Simple)
{
diff --git a/geometry/geometry_tests/nearby_points_sweeper_test.cpp b/geometry/geometry_tests/nearby_points_sweeper_test.cpp
index 4e84963fb2..187a286f5b 100644
--- a/geometry/geometry_tests/nearby_points_sweeper_test.cpp
+++ b/geometry/geometry_tests/nearby_points_sweeper_test.cpp
@@ -3,7 +3,7 @@
#include "geometry/nearby_points_sweeper.hpp"
#include "geometry/point2d.hpp"
-#include "base/stl_add.hpp"
+#include "base/stl_helpers.hpp"
#include <set>
#include <utility>
@@ -30,7 +30,7 @@ UNIT_TEST(NearbyPointsSweeper_Smoke)
TIndexSet expected = {0};
TIndexSet actual;
- sweeper.Sweep(MakeInsertFunctor(actual));
+ sweeper.Sweep(base::MakeInsertFunctor(actual));
TEST_EQUAL(expected, actual, ());
}
@@ -48,7 +48,7 @@ UNIT_TEST(NearbyPointsSweeper_Smoke)
TIndexSet expected = {0, 2, 5};
TIndexSet actual;
- sweeper.Sweep(MakeInsertFunctor(actual));
+ sweeper.Sweep(base::MakeInsertFunctor(actual));
TEST_EQUAL(expected, actual, ());
}
@@ -62,7 +62,7 @@ UNIT_TEST(NearbyPointsSweeper_Smoke)
TIndexSet expected = {0, 2, 5};
TIndexSet actual;
- sweeper.Sweep(MakeInsertFunctor(actual));
+ sweeper.Sweep(base::MakeInsertFunctor(actual));
TEST_EQUAL(expected, actual, ());
}
@@ -80,7 +80,7 @@ UNIT_TEST(NearbyPointsSweeper_Smoke)
TIndexSet expected = {0, 2, 3};
TIndexSet actual;
- sweeper.Sweep(MakeInsertFunctor(actual));
+ sweeper.Sweep(base::MakeInsertFunctor(actual));
TEST_EQUAL(expected, actual, ());
}
@@ -106,7 +106,7 @@ UNIT_TEST(NearbyPointsSweeper_CornerCases)
}
TIndexSet actual;
- sweeper.Sweep(MakeInsertFunctor(actual));
+ sweeper.Sweep(base::MakeInsertFunctor(actual));
TEST_EQUAL(expected, actual, ());
}
@@ -118,7 +118,7 @@ UNIT_TEST(NearbyPointsSweeper_CornerCases)
TIndexSet expected = {0};
TIndexSet actual;
- sweeper.Sweep(MakeInsertFunctor(actual));
+ sweeper.Sweep(base::MakeInsertFunctor(actual));
TEST_EQUAL(expected, actual, ());
}
@@ -134,7 +134,7 @@ UNIT_TEST(NearbyPointsSweeper_Priority)
TIndexSet expected = {9};
TIndexSet actual;
- sweeper.Sweep(MakeInsertFunctor(actual));
+ sweeper.Sweep(base::MakeInsertFunctor(actual));
TEST_EQUAL(expected, actual, ());
}
@@ -148,7 +148,7 @@ UNIT_TEST(NearbyPointsSweeper_Priority)
TIndexSet expected = {1, 3};
TIndexSet actual;
- sweeper.Sweep(MakeInsertFunctor(actual));
+ sweeper.Sweep(base::MakeInsertFunctor(actual));
TEST_EQUAL(expected, actual, ());
}
@@ -163,7 +163,7 @@ UNIT_TEST(NearbyPointsSweeper_Priority)
TIndexSet expected = {1, 3};
TIndexSet actual;
- sweeper.Sweep(MakeInsertFunctor(actual));
+ sweeper.Sweep(base::MakeInsertFunctor(actual));
TEST_EQUAL(expected, actual, ());
}
diff --git a/geometry/geometry_tests/polygon_test.cpp b/geometry/geometry_tests/polygon_test.cpp
index 43160772fd..11b1aed991 100644
--- a/geometry/geometry_tests/polygon_test.cpp
+++ b/geometry/geometry_tests/polygon_test.cpp
@@ -29,9 +29,9 @@ void TestFindStrip(P const * beg, size_t n)
TEST_LESS(i, n, ());
vector<size_t> test;
- MakeSingleStripFromIndex(i, n, MakeBackInsertFunctor(test));
+ MakeSingleStripFromIndex(i, n, base::MakeBackInsertFunctor(test));
- my::SortUnique(test);
+ base::SortUnique(test);
TEST_EQUAL(test.size(), n, ());
}
diff --git a/geometry/geometry_tests/simplification_test.cpp b/geometry/geometry_tests/simplification_test.cpp
index be841051a9..dbff12a085 100644
--- a/geometry/geometry_tests/simplification_test.cpp
+++ b/geometry/geometry_tests/simplification_test.cpp
@@ -10,7 +10,7 @@
#include "base/logging.hpp"
#include "base/macros.hpp"
-#include "base/stl_add.hpp"
+#include "base/stl_helpers.hpp"
#include <cstdint>
#include <limits>
@@ -22,7 +22,7 @@ namespace
{
using P = m2::PointD;
using DistanceFn = m2::SquaredDistanceFromSegmentToPoint<P>;
-using PointOutput = BackInsertFunctor<vector<m2::PointD>>;
+using PointOutput = base::BackInsertFunctor<vector<m2::PointD>>;
using SimplifyFn = void (*)(m2::PointD const *, m2::PointD const *, double, DistanceFn,
PointOutput);
@@ -40,7 +40,7 @@ void TestSimplificationSmoke(SimplifyFn simplifyFn)
m2::PointD const points[] = {P(0.0, 1.0), P(2.2, 3.6), P(3.2, 3.6)};
double const epsilon = 0.1;
vector<m2::PointD> result, expectedResult(points, points + 3);
- simplifyFn(points, points + 3, epsilon, DistanceFn(), MakeBackInsertFunctor(result));
+ simplifyFn(points, points + 3, epsilon, DistanceFn(), base::MakeBackInsertFunctor(result));
TEST_EQUAL(result, expectedResult, (epsilon));
}
@@ -50,7 +50,7 @@ void TestSimplificationOfLine(SimplifyFn simplifyFn)
for (double epsilon = numeric_limits<double>::denorm_min(); epsilon < 1000; epsilon *= 2)
{
vector<m2::PointD> result, expectedResult(points, points + 2);
- simplifyFn(points, points + 2, epsilon, DistanceFn(), MakeBackInsertFunctor(result));
+ simplifyFn(points, points + 2, epsilon, DistanceFn(), base::MakeBackInsertFunctor(result));
TEST_EQUAL(result, expectedResult, (epsilon));
}
}
@@ -60,7 +60,7 @@ void TestSimplificationOfPoly(m2::PointD const * points, size_t count, SimplifyF
for (double epsilon = 0.00001; epsilon < 0.11; epsilon *= 10)
{
vector<m2::PointD> result;
- simplifyFn(points, points + count, epsilon, DistanceFn(), MakeBackInsertFunctor(result));
+ simplifyFn(points, points + count, epsilon, DistanceFn(), base::MakeBackInsertFunctor(result));
// LOG(LINFO, ("eps:", epsilon, "size:", result.size()));
TEST_GREATER(result.size(), 1, ());
diff --git a/geometry/geometry_tests/tree_test.cpp b/geometry/geometry_tests/tree_test.cpp
index 1495663049..5cf8ff06f8 100644
--- a/geometry/geometry_tests/tree_test.cpp
+++ b/geometry/geometry_tests/tree_test.cpp
@@ -40,12 +40,12 @@ UNIT_TEST(Tree4D_Smoke)
theTree.ReplaceAllInRect(arr[i], &RTrue<R>);
vector<R> test;
- theTree.ForEach(MakeBackInsertFunctor(test));
+ theTree.ForEach(base::MakeBackInsertFunctor(test));
TEST_EQUAL(3, test.size(), ());
test.clear();
R const searchR(1.5, 1.5, 1.5, 1.5);
- theTree.ForEachInRect(searchR, MakeBackInsertFunctor(test));
+ theTree.ForEachInRect(searchR, base::MakeBackInsertFunctor(test));
TEST_EQUAL(1, test.size(), ());
TEST_EQUAL(test[0], arr[1], ());
@@ -53,12 +53,12 @@ UNIT_TEST(Tree4D_Smoke)
theTree.ReplaceAllInRect(replaceR, &RTrue<R>);
test.clear();
- theTree.ForEach(MakeBackInsertFunctor(test));
+ theTree.ForEach(base::MakeBackInsertFunctor(test));
TEST_EQUAL(1, test.size(), ());
TEST_EQUAL(test[0], replaceR, ());
test.clear();
- theTree.ForEachInRect(searchR, MakeBackInsertFunctor(test));
+ theTree.ForEachInRect(searchR, base::MakeBackInsertFunctor(test));
TEST_EQUAL(1, test.size(), ());
}
@@ -84,7 +84,7 @@ UNIT_TEST(Tree4D_ReplaceAllInRect)
}
vector<R> test;
- theTree.ForEach(MakeBackInsertFunctor(test));
+ theTree.ForEach(base::MakeBackInsertFunctor(test));
TEST_EQUAL(ARRAY_SIZE(arr), test.size(), ());
for (size_t i = 0; i < test.size(); ++i)
@@ -101,7 +101,7 @@ void CheckInRect(R const * arr, size_t count, R const & searchR, size_t expected
theTree.Add(arr[i], arr[i]);
vector<R> test;
- theTree.ForEachInRect(searchR, MakeBackInsertFunctor(test));
+ theTree.ForEachInRect(searchR, base::MakeBackInsertFunctor(test));
TEST_EQUAL(test.size(), expected, ());
}
@@ -151,14 +151,14 @@ UNIT_TEST(Tree4D_ReplaceEqual)
theTree.ReplaceEqualInRect(arr[i], equal_to<T>(), &RTrue<T>);
vector<T> test;
- theTree.ForEach(MakeBackInsertFunctor(test));
+ theTree.ForEach(base::MakeBackInsertFunctor(test));
TEST_EQUAL(3, test.size(), ());
// 2.
theTree.ReplaceEqualInRect(T(0, 0, 3, 3, 2), equal_to<T>(), &RFalse<T>);
test.clear();
- theTree.ForEach(MakeBackInsertFunctor(test));
+ theTree.ForEach(base::MakeBackInsertFunctor(test));
TEST_EQUAL(3, test.size(), ());
auto i = find(test.begin(), test.end(), T(1, 1, 2, 2, 2));
@@ -168,7 +168,7 @@ UNIT_TEST(Tree4D_ReplaceEqual)
theTree.ReplaceEqualInRect(T(0, 0, 3, 3, 2), equal_to<T>(), &RTrue<T>);
test.clear();
- theTree.ForEach(MakeBackInsertFunctor(test));
+ theTree.ForEach(base::MakeBackInsertFunctor(test));
TEST_EQUAL(3, test.size(), ());
i = find(test.begin(), test.end(), T(1, 1, 2, 2, 2));
diff --git a/geometry/polygon.hpp b/geometry/polygon.hpp
index 9ddca7427a..b4d91722c5 100644
--- a/geometry/polygon.hpp
+++ b/geometry/polygon.hpp
@@ -5,7 +5,7 @@
#include "base/assert.hpp"
#include "base/base.hpp"
#include "base/math.hpp"
-#include "base/stl_add.hpp"
+#include "base/stl_helpers.hpp"
#include "std/iterator.hpp"
#include "std/limits.hpp"
@@ -72,8 +72,8 @@ template <typename IterT> bool IsPolygonCCW(IterT beg, IterT end)
}
}
- double cp = m2::robust::OrientedS(*PrevIterInCycle(iRes, beg, end), *iRes,
- *NextIterInCycle(iRes, beg, end));
+ double cp = m2::robust::OrientedS(*base::PrevIterInCycle(iRes, beg, end), *iRes,
+ *base::NextIterInCycle(iRes, beg, end));
if (cp != 0.0)
return (cp > 0.0);
@@ -88,8 +88,8 @@ template <typename IterT> bool IsPolygonCCW(IterT beg, IterT end)
}
}
- IterT iPrev = PrevIterInCycle(iRes, beg, end);
- IterT iNext = NextIterInCycle(iRes, beg, end);
+ IterT iPrev = base::PrevIterInCycle(iRes, beg, end);
+ IterT iNext = base::NextIterInCycle(iRes, beg, end);
cp = m2::robust::OrientedS(*iPrev, *iRes, *iNext);
ASSERT_NOT_EQUAL(cp, 0.0, (*iPrev, *iRes, *iNext));
@@ -105,15 +105,15 @@ bool IsDiagonalVisible(IterT beg, IterT end, IterT i0, IterT i1)
ASSERT ( TestPolygonPreconditions(beg, end), () );
ASSERT ( i0 != i1, () );
- IterT const prev = PrevIterInCycle(i0, beg, end);
- IterT const next = NextIterInCycle(i0, beg, end);
+ IterT const prev = base::PrevIterInCycle(i0, beg, end);
+ IterT const next = base::NextIterInCycle(i0, beg, end);
if (prev == i1 || next == i1)
return true;
if (!m2::robust::IsSegmentInCone(*i0, *i1, *prev, *next))
return false;
- for (IterT j0 = beg, j1 = PrevIterInCycle(beg, beg, end); j0 != end; j1 = j0++)
+ for (IterT j0 = beg, j1 = base::PrevIterInCycle(beg, beg, end); j0 != end; j1 = j0++)
if (j0 != i0 && j0 != i1 && j1 != i0 && j1 != i1 && m2::robust::SegmentsIntersect(*i0, *i1, *j0, *j1))
return false;
@@ -176,7 +176,7 @@ template <class TIter> double GetPolygonArea(TIter beg, TIter end)
TIter curr = beg;
while (curr != end)
{
- TIter next = NextIterInCycle(curr, beg, end);
+ TIter next = base::NextIterInCycle(curr, beg, end);
area += ((*curr).x * (*next).y - (*curr).y * (*next).x);
++curr;
}
diff --git a/geometry/robust_orientation.hpp b/geometry/robust_orientation.hpp
index 5417ff73c1..d4b86c96f2 100644
--- a/geometry/robust_orientation.hpp
+++ b/geometry/robust_orientation.hpp
@@ -2,7 +2,7 @@
#include "geometry/point2d.hpp"
-#include "base/stl_add.hpp"
+#include "base/stl_helpers.hpp"
#include <algorithm>
#include <iterator>
@@ -51,8 +51,8 @@ bool CheckPolygonSelfIntersections(Iter beg, Iter end)
if (std::distance(i, j) <= 1 || (i == beg && j == last))
continue;
- Iter ii = NextIterInCycle(i, beg, end);
- Iter jj = NextIterInCycle(j, beg, end);
+ Iter ii = base::NextIterInCycle(i, beg, end);
+ Iter jj = base::NextIterInCycle(j, beg, end);
PointD a = *i, b = *ii, c = *j, d = *jj;
// check for rect intersection
@@ -78,13 +78,13 @@ bool CheckPolygonSelfIntersections(Iter beg, Iter end)
if (s1 == 0.0 && IsInSection(a, b, c))
{
- PointD const prev = *PrevIterInCycle(j, beg, end);
+ PointD const prev = *base::PrevIterInCycle(j, beg, end);
PointD test[] = {a, b};
if (a == c)
- test[0] = *PrevIterInCycle(i, beg, end);
+ test[0] = *base::PrevIterInCycle(i, beg, end);
if (b == c)
- test[1] = *NextIterInCycle(ii, beg, end);
+ test[1] = *base::NextIterInCycle(ii, beg, end);
if (IsSegmentInCone(c, test[0], prev, d) == IsSegmentInCone(c, test[1], prev, d))
continue;
@@ -92,13 +92,13 @@ bool CheckPolygonSelfIntersections(Iter beg, Iter end)
if (s2 == 0.0 && IsInSection(a, b, d))
{
- PointD const next = *NextIterInCycle(jj, beg, end);
+ PointD const next = *base::NextIterInCycle(jj, beg, end);
PointD test[] = {a, b};
if (a == d)
- test[0] = *PrevIterInCycle(i, beg, end);
+ test[0] = *base::PrevIterInCycle(i, beg, end);
if (b == d)
- test[1] = *NextIterInCycle(ii, beg, end);
+ test[1] = *base::NextIterInCycle(ii, beg, end);
if (IsSegmentInCone(d, test[0], c, next) == IsSegmentInCone(d, test[1], c, next))
continue;
@@ -106,13 +106,13 @@ bool CheckPolygonSelfIntersections(Iter beg, Iter end)
if (s3 == 0.0 && IsInSection(c, d, a))
{
- PointD const prev = *PrevIterInCycle(i, beg, end);
+ PointD const prev = *base::PrevIterInCycle(i, beg, end);
PointD test[] = {c, d};
if (c == a)
- test[0] = *PrevIterInCycle(j, beg, end);
+ test[0] = *base::PrevIterInCycle(j, beg, end);
if (d == a)
- test[1] = *NextIterInCycle(jj, beg, end);
+ test[1] = *base::NextIterInCycle(jj, beg, end);
if (IsSegmentInCone(a, test[0], prev, b) == IsSegmentInCone(a, test[1], prev, b))
continue;
@@ -120,13 +120,13 @@ bool CheckPolygonSelfIntersections(Iter beg, Iter end)
if (s4 == 0.0 && IsInSection(c, d, b))
{
- PointD const next = *NextIterInCycle(ii, beg, end);
+ PointD const next = *base::NextIterInCycle(ii, beg, end);
PointD test[] = {c, d};
if (c == b)
- test[0] = *PrevIterInCycle(j, beg, end);
+ test[0] = *base::PrevIterInCycle(j, beg, end);
if (d == b)
- test[1] = *NextIterInCycle(jj, beg, end);
+ test[1] = *base::NextIterInCycle(jj, beg, end);
if (IsSegmentInCone(b, test[0], a, next) == IsSegmentInCone(b, test[1], a, next))
continue;
diff --git a/geometry/simplification.hpp b/geometry/simplification.hpp
index f61904f4a9..58f18cb30c 100644
--- a/geometry/simplification.hpp
+++ b/geometry/simplification.hpp
@@ -3,8 +3,8 @@
#include "geometry/point2d.hpp"
#include "base/base.hpp"
-#include "base/stl_add.hpp"
#include "base/logging.hpp"
+#include "base/stl_helpers.hpp"
#include <algorithm>
#include <cstdint>
diff --git a/geometry/tree4d.hpp b/geometry/tree4d.hpp
index 95e7669f7b..43efb33fcc 100644
--- a/geometry/tree4d.hpp
+++ b/geometry/tree4d.hpp
@@ -4,7 +4,7 @@
#include "geometry/rect2d.hpp"
#include "base/logging.hpp"
-#include "base/stl_add.hpp"
+#include "base/stl_helpers.hpp"
#include <sstream>
#include <string>