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:
authorVladiMihaylenko <vxmihaylenko@gmail.com>2018-03-05 15:05:06 +0300
committerDaria Volvenkova <d.volvenkova@corp.mail.ru>2018-03-06 12:17:41 +0300
commita0e432bf6814a1fae8e41c02e5f97ae6642385a1 (patch)
tree73ea27492b1f0b49efa1b25d41d6123aff22bcd6 /geometry
parentfe4a26a2e1925003234f624b4db25deabdadee1b (diff)
Using _t suffix instead of ::type in whole project + using std:: somewhere.
Diffstat (limited to 'geometry')
-rw-r--r--geometry/algorithm.hpp33
1 files changed, 17 insertions, 16 deletions
diff --git a/geometry/algorithm.hpp b/geometry/algorithm.hpp
index 89f95150bd..bdfd7d964e 100644
--- a/geometry/algorithm.hpp
+++ b/geometry/algorithm.hpp
@@ -3,10 +3,10 @@
#include "geometry/point2d.hpp"
#include "geometry/rect2d.hpp"
-#include "std/array.hpp"
-#include "std/type_traits.hpp"
-#include "std/utility.hpp"
-#include "std/vector.hpp"
+#include <array>
+#include <type_traits>
+#include <utility>
+#include <vector>
namespace m2
{
@@ -30,7 +30,7 @@ private:
double m_len;
};
- vector<Value> m_poly;
+ std::vector<Value> m_poly;
double m_length;
};
@@ -65,7 +65,7 @@ namespace impl
template <typename TCalculator, typename TIterator>
m2::PointD ApplyPointOnSurfaceCalculator(TIterator begin, TIterator end, TCalculator && calc)
{
- array<m2::PointD, 3> triangle;
+ std::array<m2::PointD, 3> triangle;
while (begin != end)
{
for (auto i = 0; i < 3; ++i)
@@ -89,17 +89,17 @@ auto ApplyCalculator(TIterator begin, TIterator end, TCalculator && calc)
}
template <typename TCalculator, typename TIterator>
-auto SelectImplementation(TIterator begin, TIterator end, TCalculator && calc, true_type const &)
- -> decltype(calc.GetResult())
+auto SelectImplementation(TIterator begin, TIterator end, TCalculator && calc,
+ std::true_type const &) -> decltype(calc.GetResult())
{
- return impl::ApplyPointOnSurfaceCalculator(begin, end, forward<TCalculator>(calc));
+ return impl::ApplyPointOnSurfaceCalculator(begin, end, std::forward<TCalculator>(calc));
}
template <typename TCalculator, typename TIterator>
-auto SelectImplementation(TIterator begin, TIterator end, TCalculator && calc, false_type const &)
- -> decltype(calc.GetResult())
+auto SelectImplementation(TIterator begin, TIterator end, TCalculator && calc,
+ std::false_type const &) -> decltype(calc.GetResult())
{
- return impl::ApplyCalculator(begin, end, forward<TCalculator>(calc));
+ return impl::ApplyCalculator(begin, end, std::forward<TCalculator>(calc));
}
} // namespace impl
@@ -107,15 +107,16 @@ template <typename TCalculator, typename TIterator>
auto ApplyCalculator(TIterator begin, TIterator end, TCalculator && calc)
-> decltype(calc.GetResult())
{
- return impl::SelectImplementation(begin, end, forward<TCalculator>(calc),
- is_same<CalculatePointOnSurface,
- typename remove_reference<TCalculator>::type>());
+ return impl::SelectImplementation(
+ begin, end, std::forward<TCalculator>(calc),
+ std::is_same<CalculatePointOnSurface, std::remove_reference_t<TCalculator>>());
}
template <typename TCalculator, typename TCollection>
auto ApplyCalculator(TCollection && collection, TCalculator && calc)
-> decltype(calc.GetResult())
{
- return ApplyCalculator(begin(collection), end(collection), forward<TCalculator>(calc));
+ return ApplyCalculator(std::begin(collection), std::end(collection),
+ std::forward<TCalculator>(calc));
}
} // namespace m2