From 84c1e00c9509f61d06976b19bbf529eb31301b25 Mon Sep 17 00:00:00 2001 From: Clownacy Date: Thu, 10 Sep 2020 19:07:46 +0100 Subject: [PATCH] Tidy-up some code --- src/Font.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/Font.cpp b/src/Font.cpp index 59b9db81..c776aad0 100644 --- a/src/Font.cpp +++ b/src/Font.cpp @@ -964,10 +964,11 @@ static unsigned char GammaCorrect(unsigned char value) static Glyph* GetGlyph(FontObject *font_object, unsigned long unicode_value) { Glyph **glyph_pointer = &font_object->glyph_list_head; + Glyph *glyph; for (;;) { - Glyph *glyph = *glyph_pointer; + glyph = *glyph_pointer; if (glyph->unicode_value == unicode_value) { @@ -985,8 +986,6 @@ static Glyph* GetGlyph(FontObject *font_object, unsigned long unicode_value) glyph_pointer = &glyph->next; } - Glyph *glyph = *glyph_pointer; - // Couldn't find glyph - overwrite the old at the end. // The one at the end hasn't been used in a while anyway.