[FONT][WIN32SS] Refactor the loop (1 of 5)

This commit is contained in:
Katayama Hirofumi MZ 2018-08-20 06:08:38 +09:00 committed by Mark Jansen
parent c4e0107765
commit 5daa7b07c8

View file

@ -266,16 +266,17 @@ RemoveCachedEntry(PFONT_CACHE_ENTRY Entry)
static void
RemoveCacheEntries(FT_Face Face)
{
PLIST_ENTRY CurrentEntry;
PLIST_ENTRY CurrentEntry, NextEntry;
PFONT_CACHE_ENTRY FontEntry;
ASSERT_FREETYPE_LOCK_HELD();
CurrentEntry = g_FontCacheListHead.Flink;
while (CurrentEntry != &g_FontCacheListHead)
for (CurrentEntry = g_FontCacheListHead.Flink;
CurrentEntry != &g_FontCacheListHead;
CurrentEntry = NextEntry)
{
FontEntry = CONTAINING_RECORD(CurrentEntry, FONT_CACHE_ENTRY, ListEntry);
CurrentEntry = CurrentEntry->Flink;
NextEntry = CurrentEntry->Flink;
if (FontEntry->Face == Face)
{