Aric Stewart aric@codeweavers.com writes:
@@ -968,6 +968,28 @@ static const IDWriteFontFamilyVtbl fontfamilyvtbl = { dwritefontfamily_GetMatchingFonts };
+static HRESULT fontfamily_AddFont(struct dwrite_fontfamily *family, IDWriteFont *font) +{
- struct dwrite_font *font_data = impl_from_IDWriteFont(font);
- if (family->font_count + 1 >= family->alloc)
- {
struct dwrite_font_data **new_list;
UINT32 new_alloc;
new_alloc = family->alloc * 2;
new_list = heap_realloc(family->fonts, sizeof(*family->fonts) * new_alloc);
if (!new_list)
return E_OUTOFMEMORY;
family->fonts = new_list;
family->alloc = new_alloc;
- }
- family->fonts[family->font_count] = font_data->data;
- InterlockedIncrement(&font_data->data->ref);
- family->font_count++;
- return S_OK;
+}
Please don't add dead code.