(svn r8097) Replace strlen() {==,!=,>} 0 by the more concise {,!}StrEmpty(). Additionally the test takes O(1) instead of O(n) now

This commit is contained in:
tron
2007-01-13 15:00:16 +00:00
parent 64f34d322d
commit e043c6cef7
5 changed files with 13 additions and 9 deletions

View File

@@ -235,7 +235,7 @@ static void LoadFreeTypeFont(const char *font_name, FT_Face *face, const char *t
{
FT_Error error;
if (strlen(font_name) == 0) return;
if (StrEmpty(font_name)) return;
error = FT_New_Face(_library, font_name, 0, face);
@@ -278,7 +278,7 @@ static void LoadFreeTypeFont(const char *font_name, FT_Face *face, const char *t
void InitFreeType(void)
{
if (strlen(_freetype.small_font) == 0 && strlen(_freetype.medium_font) == 0 && strlen(_freetype.large_font) == 0) {
if (StrEmpty(_freetype.small_font) && StrEmpty(_freetype.medium_font) && StrEmpty(_freetype.large_font)) {
DEBUG(freetype, 1, "No font faces specified, using sprite fonts instead");
return;
}