float x = 0;
unsigned prev = 0;
- for(string::const_iterator i=str.begin(); i!=str.end();)
+ for(auto i=str.begin(); i!=str.end();)
{
unsigned c = dec.decode_char(str, i);
if(prev)
unsigned prev = 0;
unsigned next = 0;
- for(string::const_iterator i=str.begin(); (next || i!=str.end());)
+ for(auto i=str.begin(); (next || i!=str.end());)
{
unsigned c = (next ? next : dec.decode_char(str, i));
next = (i!=str.end() ? dec.decode_char(str, i) : 0);
next = 0;
}
- GlyphMap::const_iterator j = glyphs.find(c);
+ auto j = glyphs.find(c);
if(j==glyphs.end())
continue;
float Font::get_glyph_advance(unsigned code, unsigned next) const
{
- GlyphMap::const_iterator i = glyphs.find(code);
+ auto i = glyphs.find(code);
if(i==glyphs.end())
return 0;
if(next)
{
- KerningMap::const_iterator j = kerning.find(CodePair(code, next));
+ auto j = kerning.find(CodePair(code, next));
if(j!=kerning.end())
advance += j->second;
}
unsigned Font::get_ligature(unsigned code, unsigned next) const
{
- LigatureMap::const_iterator i = ligatures.find(CodePair(code, next));
+ auto i = ligatures.find(CodePair(code, next));
return (i!=ligatures.end() ? i->second : 0);
}