logo

oasis

Own branch of Oasis Linux (upstream: <https://git.sr.ht/~mcf/oasis/>) git clone https://anongit.hacktivis.me/git/oasis.git

0001-Remove-unnecessary-use-of-long-double-constants.patch (2078B)


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