Codechange: do not declare functions in blocks

This commit is contained in:
Rubidium
2023-01-29 09:28:24 +01:00
committed by rubidium42
parent 5a4f0498fe
commit 4e65ec1dc4
45 changed files with 64 additions and 61 deletions

View File

@@ -121,6 +121,15 @@ void SetFont(FontSize fontsize, const std::string& font, uint size, bool aa)
if (_save_config) SaveToConfig();
}
#ifdef WITH_FREETYPE
extern void LoadFreeTypeFont(FontSize fs);
extern void UninitFreeType();
#elif defined(_WIN32)
extern void LoadWin32Font(FontSize fs);
#elif defined(WITH_COCOA)
extern void LoadCoreTextFont(FontSize fs);
#endif
/**
* (Re)initialize the font cache related things, i.e. load the non-sprite fonts.
* @param monospace Whether to initialise the monospace or regular fonts.
@@ -134,13 +143,10 @@ void InitFontCache(bool monospace)
if (fc->HasParent()) delete fc;
#ifdef WITH_FREETYPE
extern void LoadFreeTypeFont(FontSize fs);
LoadFreeTypeFont(fs);
#elif defined(_WIN32)
extern void LoadWin32Font(FontSize fs);
LoadWin32Font(fs);
#elif defined(WITH_COCOA)
extern void LoadCoreTextFont(FontSize fs);
LoadCoreTextFont(fs);
#endif
}
@@ -157,7 +163,6 @@ void UninitFontCache()
}
#ifdef WITH_FREETYPE
extern void UninitFreeType();
UninitFreeType();
#endif /* WITH_FREETYPE */
}