# HG changeset patch # User David Demelier # Date 1693245708 -7200 # Node ID 6271599928d40f5f69964c08a3888cf446425807 # Parent 3d238b43a9aa7ae8f5a68905e25c3b845a53a79c core: remove mlk_font_ok diff -r 3d238b43a9aa -r 6271599928d4 libmlk-core/mlk/core/font.c --- a/libmlk-core/mlk/core/font.c Sun Aug 27 13:22:51 2023 +0200 +++ b/libmlk-core/mlk/core/font.c Mon Aug 28 20:01:48 2023 +0200 @@ -58,15 +58,10 @@ } int -mlk_font_ok(const struct mlk_font *font) -{ - return font && font->handle; -} - -int mlk_font_render(struct mlk_font *font, struct mlk_texture *tex, const char *text, unsigned long color) { - assert(mlk_font_ok(font)); + assert(font); + assert(tex); assert(text); SDL_Color fg = { @@ -96,7 +91,7 @@ unsigned int mlk_font_height(const struct mlk_font *font) { - assert(mlk_font_ok(font)); + assert(font); return TTF_FontHeight(font->handle); } @@ -104,7 +99,7 @@ int mlk_font_query(const struct mlk_font *font, const char *text, unsigned int *w, unsigned int *h) { - assert(mlk_font_ok(font)); + assert(font); assert(text); if (w) diff -r 3d238b43a9aa -r 6271599928d4 libmlk-core/mlk/core/font.h --- a/libmlk-core/mlk/core/font.h Sun Aug 27 13:22:51 2023 +0200 +++ b/libmlk-core/mlk/core/font.h Mon Aug 28 20:01:48 2023 +0200 @@ -107,15 +107,6 @@ unsigned int size); /** - * Tells if the font is usable. - * - * \param font the font to check - * \return non-zero if the font structure is usable - */ -int -mlk_font_ok(const struct mlk_font *font); - -/** * Render some text using the font and generate a texture. * * The texture destination must be deallocated once no longer used using