[FONT][WIN32SS] Refactor the loop (4 of 5)
authorKatayama Hirofumi MZ <katayama.hirofumi.mz@gmail.com>
Sun, 19 Aug 2018 04:38:06 +0000 (13:38 +0900)
committerMark Jansen <mark.jansen@reactos.org>
Sun, 19 Aug 2018 21:05:35 +0000 (23:05 +0200)
win32ss/gdi/ntgdi/freetype.c

index 013c0bb..97d4b2d 100644 (file)
@@ -2672,8 +2672,9 @@ ftGdiGlyphCacheGet(
 
     ASSERT_FREETYPE_LOCK_HELD();
 
-    CurrentEntry = g_FontCacheListHead.Flink;
-    while (CurrentEntry != &g_FontCacheListHead)
+    for (CurrentEntry = g_FontCacheListHead.Flink;
+         CurrentEntry != &g_FontCacheListHead;
+         CurrentEntry = CurrentEntry->Flink)
     {
         FontEntry = CONTAINING_RECORD(CurrentEntry, FONT_CACHE_ENTRY, ListEntry);
         if ((FontEntry->Face == Face) &&
@@ -2682,7 +2683,6 @@ ftGdiGlyphCacheGet(
             (FontEntry->RenderMode == RenderMode) &&
             (SameScaleMatrix(&FontEntry->mxWorldToDevice, pmx)))
             break;
-        CurrentEntry = CurrentEntry->Flink;
     }
 
     if (CurrentEntry == &g_FontCacheListHead)