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
path: root/drape
diff options
context:
space:
mode:
authorMaxim Pimenov <m@maps.me>2019-09-06 17:51:14 +0300
committerTatiana Yan <tatiana.kondakova@gmail.com>2019-09-09 13:52:29 +0300
commit640198a2d543fed90d3e95d0fbcbe62b631494e6 (patch)
tree3f6a34fee9f9b6ab9edc8d048c276bfec70984d9 /drape
parent86fad33ed83ee6320e78614601e5387759e8d249 (diff)
[base] Removed unused functions; minor refactoring.
Diffstat (limited to 'drape')
-rw-r--r--drape/batcher_helpers.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/drape/batcher_helpers.cpp b/drape/batcher_helpers.cpp
index fa86e4a2d6..28a2c55c8c 100644
--- a/drape/batcher_helpers.cpp
+++ b/drape/batcher_helpers.cpp
@@ -12,6 +12,16 @@ namespace dp
{
namespace
{
+template <typename T>
+T CyclicClamp(T const x, T const xmin, T const xmax)
+{
+ if (x > xmax)
+ return xmin;
+ if (x < xmin)
+ return xmax;
+ return x;
+}
+
bool IsEnoughMemory(uint32_t avVertex, uint32_t existVertex, uint32_t avIndex, uint32_t existIndex)
{
return avVertex >= existVertex && avIndex >= existIndex;
@@ -60,7 +70,7 @@ protected:
int16_t GetCWNormalizer()
{
int16_t tmp = m_minStripCounter;
- m_minStripCounter = static_cast<uint8_t>(base::cyclicClamp(m_minStripCounter + 1, 0, 5));
+ m_minStripCounter = static_cast<uint8_t>(CyclicClamp(m_minStripCounter + 1, 0, 5));
switch (tmp)
{
case 4: return 1;