diff options
author | Alan Coopersmith <alan.coopersmith@oracle.com> | 2024-01-27 11:19:36 -0800 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2024-02-03 02:48:03 +0000 |
commit | 0be12a9f7c8cbc710660d29ec54328916cc41beb (patch) | |
tree | 599ece0efda63edd56d9e99401ffb6b452ad1705 /src | |
parent | 42d2b5add560ad9a14f36c5f628e83a39ac89f47 (diff) |
bitscale.c: ensure SCORE macro expands properly
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/bitmap/bitscale.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/bitmap/bitscale.c b/src/bitmap/bitscale.c index 4f6d266..b0d0be7 100644 --- a/src/bitmap/bitscale.c +++ b/src/bitmap/bitscale.c @@ -281,15 +281,15 @@ ComputeScaleFactors(FontScalablePtr from, FontScalablePtr to, /* favor enlargement over reduction because of aliasing resulting from reduction */ #define SCORE(m,s) \ -if (m >= 1.0) { \ - if (m == 1.0) \ - score += (16 * s); \ - else if (m == 2.0) \ - score += (4 * s); \ +if ((m) >= 1.0) { \ + if ((m) == 1.0) \ + score += (16 * (s)); \ + else if ((m) == 2.0) \ + score += (4 * (s)); \ else \ - score += (int)(((double)(3 * s)) / m); \ + score += (int)(((double)(3 * (s))) / (m)); \ } else { \ - score += (int)(((double)(2 * s)) * m); \ + score += (int)(((double)(2 * (s))) * (m)); \ } /* don't need to favor enlargement when looking for bitmap that can |