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:
authorExMix <rahuba.youri@mapswithme.com>2014-11-19 09:33:16 +0300
committerAlex Zolotarev <alex@maps.me>2015-09-23 02:32:56 +0300
commitd5f9daeec0e1044df0feba2d3e84809d4165fcab (patch)
tree891fdd8c3190d38672c8c3d83d811dadbe6ff1e0 /drape
parent20f48e426efdd09d23729fea8be264b8de1cce7a (diff)
review fix
Diffstat (limited to 'drape')
-rw-r--r--drape/color.hpp4
-rw-r--r--drape/glfunctions.cpp7
2 files changed, 5 insertions, 6 deletions
diff --git a/drape/color.hpp b/drape/color.hpp
index d5f88fc686..20c575bbd6 100644
--- a/drape/color.hpp
+++ b/drape/color.hpp
@@ -19,6 +19,10 @@ struct Color
uint8_t m_alfa;
int GetColorInInt() const { return (m_alfa << 24) | (m_blue << 16) | (m_green << 8) | m_red; }
+
+ static Color Black() { return Color(0, 0, 0, 255); }
+ static Color White() { return Color(255, 255, 255, 255); }
+ static Color Red() { return Color(255, 0, 0, 255); }
};
struct ColorF
diff --git a/drape/glfunctions.cpp b/drape/glfunctions.cpp
index d412c3db41..01d01a8daa 100644
--- a/drape/glfunctions.cpp
+++ b/drape/glfunctions.cpp
@@ -321,11 +321,7 @@ void GLFunctions::glBindBuffer(uint32_t vbo, uint32_t target)
ASSERT(glBindBufferFn != NULL, ());
#ifdef DEBUG
threads::MutexGuard guard(g_mutex);
- TKey key = make_pair(threads::GetCurrentThreadID(), target);
- auto iter = g_boundBuffers.find(key);
- if (iter != g_boundBuffers.end())
- g_boundBuffers.erase(iter);
- g_boundBuffers.emplace(key, vbo);
+ g_boundBuffers[make_pair(threads::GetCurrentThreadID(), target)] = vbo;
#endif
GLCHECK(glBindBufferFn(target, vbo));
}
@@ -335,7 +331,6 @@ void GLFunctions::glDeleteBuffer(uint32_t vbo)
ASSERT(glDeleteBuffersFn != NULL, ());
#ifdef DEBUG
threads::MutexGuard guard(g_mutex);
- threads::ThreadID id = threads::GetCurrentThreadID();
for (TNode const & n : g_boundBuffers)
ASSERT(n.second != vbo, ());
#endif