Tweak in Font.cpp

MSVC2003 would complain about that code because it didn't understand
the C++ standard. It looked ugly anyway.
This commit is contained in:
Clownacy 2019-07-19 09:02:17 +01:00
parent 74c9931ebb
commit 24d104e2e8

View file

@ -1715,11 +1715,13 @@ static unsigned long UTF8ToUnicode(const unsigned char *string, unsigned int *by
static CachedGlyph* GetGlyphCached(FontObject *font_object, unsigned long unicode_value) static CachedGlyph* GetGlyphCached(FontObject *font_object, unsigned long unicode_value)
{ {
for (CachedGlyph *glyph = font_object->glyph_list_head; glyph != NULL; glyph = glyph->next) CachedGlyph *glyph;
for (glyph = font_object->glyph_list_head; glyph != NULL; glyph = glyph->next)
if (glyph->unicode_value == unicode_value) if (glyph->unicode_value == unicode_value)
return glyph; return glyph;
CachedGlyph *glyph = (CachedGlyph*)malloc(sizeof(CachedGlyph)); glyph = (CachedGlyph*)malloc(sizeof(CachedGlyph));
if (glyph) if (glyph)
{ {