From 74a7753f29352c8bcd54a622beabafad64268016 Mon Sep 17 00:00:00 2001 From: piepie62 Date: Wed, 27 Mar 2019 17:41:13 -0700 Subject: [PATCH] Forgotten changes --- libctru/source/font.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/libctru/source/font.c b/libctru/source/font.c index 9427242..1272cdd 100644 --- a/libctru/source/font.c +++ b/libctru/source/font.c @@ -51,8 +51,7 @@ int fontGlyphIndexFromCodePoint(CFNT_s* font, u32 codePoint) int ret = font->finf.alterCharIndex; if (codePoint < 0x10000) { - CMAP_s* cmap; - for (cmap = font->finf.cmap; cmap; cmap = cmap->next) + for (CMAP_s* cmap = font->finf.cmap; cmap; cmap = cmap->next) { if (codePoint < cmap->codeBegin || codePoint > cmap->codeEnd) continue; @@ -90,8 +89,7 @@ charWidthInfo_s* fontGetCharWidthInfo(CFNT_s* font, int glyphIndex) if (!font) return NULL; charWidthInfo_s* info = NULL; - CWDH_s* cwdh; - for (cwdh = font->finf.cwdh; cwdh && !info; cwdh = cwdh->next) + for (CWDH_s* cwdh = font->finf.cwdh; cwdh && !info; cwdh = cwdh->next) { if (glyphIndex < cwdh->startIndex || glyphIndex > cwdh->endIndex) continue;