kstars-isnan.patch 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. From: Christian Dersch <lupinix@mailbox.org>
  2. Date: Wed, 03 Feb 2016 10:19:55 +0000
  3. Subject: Fix compilation with gcc 6.x (namespace std has to be used explicitly in some cases, e.g. when ambiguous)
  4. X-Git-Tag: v16.03.80
  5. X-Git-Url: http://quickgit.kde.org/?p=kstars.git&a=commitdiff&h=7d34e52f4dd6e15b871596b3c64d4c7cdba599b4
  6. ---
  7. Fix compilation with gcc 6.x (namespace std has to be used explicitly in some cases, e.g. when ambiguous)
  8. REVIEW:126976
  9. ---
  10. --- a/kstars/fitsviewer/fitsdata.cpp
  11. +++ b/kstars/fitsviewer/fitsdata.cpp
  12. @@ -548,7 +548,7 @@
  13. int diff_x=s1->x - s2->x;
  14. int diff_y=s1->y - s2->y;
  15. - dis = abs( sqrt( diff_x*diff_x + diff_y*diff_y));
  16. + dis = std::abs( sqrt( diff_x*diff_x + diff_y*diff_y));
  17. dis -= s1->width/2;
  18. dis -= s2->width/2;
  19. --- a/kstars/tools/horizonmanager.cpp
  20. +++ b/kstars/tools/horizonmanager.cpp
  21. @@ -192,7 +192,7 @@
  22. az = dms::fromString(regionItem->child(i, 1)->data(Qt::DisplayRole).toString(), true);
  23. alt = dms::fromString(regionItem->child(i, 2)->data(Qt::DisplayRole).toString(), true);
  24. - if (isnan(az.Degrees()) || isnan(alt.Degrees()))
  25. + if (std::isnan(az.Degrees()) || std::isnan(alt.Degrees()))
  26. return false;
  27. p.setAz(az);
  28. @@ -534,9 +534,9 @@
  29. dms azAngle = dms::fromString(parent->child(item->row(),1)->data(Qt::DisplayRole).toString(), true);
  30. dms altAngle = dms::fromString(parent->child(item->row(),2)->data(Qt::DisplayRole).toString(), true);
  31. - if (isnan(azAngle.Degrees()))
  32. + if (std::isnan(azAngle.Degrees()))
  33. azOK = false;
  34. - if (isnan(altAngle.Degrees()))
  35. + if (std::isnan(altAngle.Degrees()))
  36. altOK = false;
  37. if ( (item->column() == 1 && azOK == false) || (item->column() == 2 && altOK == false) )