1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
|
From e74cd485038256cb170a102413d76ecaac61cf5b Mon Sep 17 00:00:00 2001
From: Michael Forney <mforney@mforney.org>
Date: Mon, 6 Sep 2021 18:29:49 -0700
Subject: [PATCH] Remove unnecessary use of long double constants
These constants are immediately converted to double so there is no
reason to make them long double.
---
src/fcdefault.c | 2 +-
src/fcfreetype.c | 4 ++--
src/fcxml.c | 4 ++--
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/fcdefault.c b/src/fcdefault.c
index f3addca..be00c48 100644
--- a/src/fcdefault.c
+++ b/src/fcdefault.c
@@ -263,7 +263,7 @@ FcDefaultSubstitute (FcPattern *pattern)
if (FcPatternObjectGetRange (pattern, FC_SIZE_OBJECT, 0, &r) == FcResultMatch && FcRangeGetDouble (r, &b, &e))
size = (b + e) * .5;
else
- size = 12.0L;
+ size = 12.0;
}
if (FcPatternObjectGetDouble (pattern, FC_SCALE_OBJECT, 0, &scale) != FcResultMatch)
scale = 1.0;
diff --git a/src/fcfreetype.c b/src/fcfreetype.c
index 07978cf..0845232 100644
--- a/src/fcfreetype.c
+++ b/src/fcfreetype.c
@@ -1811,8 +1811,8 @@ FcFreeTypeQueryFaceInternal (const FT_Face face,
FcRange *r;
/* usLowerPointSize and usUpperPointSize is actually twips */
- lower_size = os2->usLowerOpticalPointSize / 20.0L;
- upper_size = os2->usUpperOpticalPointSize / 20.0L;
+ lower_size = os2->usLowerOpticalPointSize / 20.0;
+ upper_size = os2->usUpperOpticalPointSize / 20.0;
if (lower_size == upper_size)
{
diff --git a/src/fcxml.c b/src/fcxml.c
index 7797502..f6516ae 100644
--- a/src/fcxml.c
+++ b/src/fcxml.c
@@ -1493,7 +1493,7 @@ FcParseRange (FcConfigParse *parse)
FcRange *r;
FcChar32 n[2] = {0, 0};
int count = 1;
- double d[2] = {0.0L, 0.0L};
+ double d[2] = {0.0, 0.0};
FcBool dflag = FcFalse;
while ((vstack = FcVStackPeek (parse)))
@@ -1519,7 +1519,7 @@ FcParseRange (FcConfigParse *parse)
default:
FcConfigMessage (parse, FcSevereError, "invalid element in range");
if (dflag)
- d[count] = 0.0L;
+ d[count] = 0.0;
else
n[count] = 0;
break;
--
2.32.0
|