summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2024-01-27 11:19:36 -0800
committerAlan Coopersmith <alan.coopersmith@oracle.com>2024-02-03 02:48:03 +0000
commit0be12a9f7c8cbc710660d29ec54328916cc41beb (patch)
tree599ece0efda63edd56d9e99401ffb6b452ad1705
parent42d2b5add560ad9a14f36c5f628e83a39ac89f47 (diff)
bitscale.c: ensure SCORE macro expands properly
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-rw-r--r--src/bitmap/bitscale.c14
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