shithub: cstory

Download patch

ref: 84c1e00c9509f61d06976b19bbf529eb31301b25
parent: 69f3fbcd5abc86bac1a966eb5646636fdad47b56
author: Clownacy <Clownacy@users.noreply.github.com>
date: Thu Sep 10 15:07:46 EDT 2020

Tidy-up some code

--- a/src/Font.cpp
+++ b/src/Font.cpp
@@ -964,10 +964,11 @@
 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)
 		{
@@ -984,8 +985,6 @@
 
 		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.