summaryrefslogtreecommitdiff
path: root/font.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2012-03-02 10:51:46 +0100
committerKlaus Schmidinger <vdr@tvdr.de>2012-03-02 10:51:46 +0100
commit1e3f6d6da29572426d5fd2fd922af9cc5219b285 (patch)
tree85a89f35bb78e82ed67eb481b18c2f79acf6b94b /font.c
parentc8808a854b58a6370baba41a8a0de97f1d4f73fd (diff)
downloadvdr-1e3f6d6da29572426d5fd2fd922af9cc5219b285.tar.gz
vdr-1e3f6d6da29572426d5fd2fd922af9cc5219b285.tar.bz2
Replaced min(max()) calls with the new function constrain()
Diffstat (limited to 'font.c')
-rw-r--r--font.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/font.c b/font.c
index b3913451..706a017c 100644
--- a/font.c
+++ b/font.c
@@ -6,7 +6,7 @@
*
* BiDi support by Osama Alrawab <alrawab@hotmail.com> @2008 Tripoli-Libya.
*
- * $Id: font.c 2.9 2012/01/13 09:43:22 kls Exp $
+ * $Id: font.c 2.10 2012/03/02 10:47:45 kls Exp $
*/
#include "font.h"
@@ -396,7 +396,7 @@ cFont *cFont::fonts[eDvbFontSize] = { NULL };
void cFont::SetFont(eDvbFont Font, const char *Name, int CharHeight)
{
- cFont *f = CreateFont(Name, min(max(CharHeight, MINFONTSIZE), MAXFONTSIZE));
+ cFont *f = CreateFont(Name, constrain(CharHeight, MINFONTSIZE, MAXFONTSIZE));
if (!f || !f->Height())
f = new cDummyFont;
delete fonts[Font];