qtcurve-1.8.18-std_isnan.patch 941 B

1234567891011121314151617181920212223242526272829303132
  1. diff --git a/lib/utils/color.h.orig b/lib/utils/color.h
  2. index 2c7081f..37d83b5 100644
  3. --- a/lib/utils/color.h.orig
  4. +++ b/lib/utils/color.h
  5. @@ -23,6 +23,8 @@
  6. #ifndef QTC_UTILS_COLOR_H
  7. #define QTC_UTILS_COLOR_H
  8. +#include <math.h>
  9. +
  10. #include "utils.h"
  11. #include "options.h"
  12. @@ -250,7 +252,7 @@ qtcColorTint(const QColor *base, const QColor *col, double amount)
  13. return *base;
  14. } else if (amount >= 1.0) {
  15. return *col;
  16. - } else if (isnan(amount)) {
  17. + } else if (std::isnan(amount)) {
  18. return *base;
  19. }
  20. const QtcColor qtc_base = {base->redF(), base->greenF(), base->blueF()};
  21. @@ -267,7 +269,7 @@ qtcColorMix(const QColor *c1, const QColor *c2, double bias)
  22. return *c1;
  23. } else if (bias >= 1.0) {
  24. return *c2;
  25. - } else if (isnan(bias)) {
  26. + } else if (std::isnan(bias)) {
  27. return *c1;
  28. }
  29. const QtcColor qtc_c1 = {c1->redF(), c1->greenF(), c1->blueF()};