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-12-13 14:16:02 +0300
committerAlex Zolotarev <alex@maps.me>2015-09-23 02:34:54 +0300
commite109c22adc75a087886f4e3aed05e3cc326da99b (patch)
tree05039ebbf6209f89be2ef822c9ca1330c679e149 /drape
parent7d3ed5cc493a343ab4e507dd646dcd394a257fdd (diff)
review fixes
Diffstat (limited to 'drape')
-rw-r--r--drape/font_texture.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/drape/font_texture.cpp b/drape/font_texture.cpp
index 1c157c1168..817ad66d37 100644
--- a/drape/font_texture.cpp
+++ b/drape/font_texture.cpp
@@ -86,7 +86,7 @@ GlyphIndex::GlyphIndex(m2::PointU size, RefPointer<GlyphManager> mng)
GlyphInfo const * GlyphIndex::MapResource(GlyphKey const & key)
{
strings::UniChar uniChar = key.GetUnicodePoint();
- TResourceMapping::const_iterator it = m_index.find(uniChar);
+ auto it = m_index.find(uniChar);
if (it != m_index.end())
return it->second.GetRaw();
@@ -100,10 +100,8 @@ GlyphInfo const * GlyphIndex::MapResource(GlyphKey const & key)
m_pendingNodes.emplace_back(r, glyph);
- pair<TResourceMapping::iterator, bool> res = m_index.emplace(uniChar, TResourcePtr(new GlyphInfo(m_packer.MapTextureCoords(r), glyph.m_metrics)));
- if (!res.second)
- return nullptr;
-
+ auto res = m_index.emplace(uniChar, TResourcePtr(new GlyphInfo(m_packer.MapTextureCoords(r), glyph.m_metrics)));
+ ASSERT(!res.second, ());
return res.first->second.GetRaw();
}