From 24d104e2e812a91f3e1d7e4b4dc8b5adf8a74fbc Mon Sep 17 00:00:00 2001 From: Clownacy Date: Fri, 19 Jul 2019 09:02:17 +0100 Subject: [PATCH] Tweak in Font.cpp MSVC2003 would complain about that code because it didn't understand the C++ standard. It looked ugly anyway. --- src/Font.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Font.cpp b/src/Font.cpp index 210e2124..d780611f 100644 --- a/src/Font.cpp +++ b/src/Font.cpp @@ -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) { - 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) return glyph; - CachedGlyph *glyph = (CachedGlyph*)malloc(sizeof(CachedGlyph)); + glyph = (CachedGlyph*)malloc(sizeof(CachedGlyph)); if (glyph) {