summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJasem Mutlaq <mutlaqja@ikarustech.com>2016-10-28 13:59:52 (GMT)
committerJasem Mutlaq <mutlaqja@ikarustech.com>2016-10-28 13:59:52 (GMT)
commitdf74f9444dea8b78a3d0ef3508abdd9aea70f77d (patch)
tree88d6ca5a945ef8dec08dffe5d42d67c595d27f41
parentc027f6849a6ed67dc258a2e0078a112314d2b713 (diff)
Use std::abs. Thanks to Christian Dersch for finding this issue
-rw-r--r--kstars/fitsviewer/fitsview.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/kstars/fitsviewer/fitsview.cpp b/kstars/fitsviewer/fitsview.cpp
index bd7ba58..5563abd 100644
--- a/kstars/fitsviewer/fitsview.cpp
+++ b/kstars/fitsviewer/fitsview.cpp
@@ -210,7 +210,7 @@ void FITSLabel::mouseMoveEvent(QMouseEvent *e)
bool objFound=false;
foreach(FITSSkyObject *listObject, image_data->objList){
- if((abs(listObject->x()-x)<5/scale)&&(abs(listObject->y()-y)<5/scale)){
+ if((std::abs(listObject->x()-x)<5/scale)&&(std::abs(listObject->y()-y)<5/scale)){
QToolTip::showText(e->globalPos(), listObject->skyObject()->name() +"\n"+listObject->skyObject()->longname() , this);
objFound=true;
break;
@@ -282,7 +282,7 @@ void FITSLabel::mousePressEvent(QMouseEvent *e)
if (image_data->hasWCS())
{
foreach(FITSSkyObject *listObject, image_data->objList){
- if((abs(listObject->x()-x)<5/scale)&&(abs(listObject->y()-y)<5/scale)){
+ if((std::abs(listObject->x()-x)<5/scale)&&(std::abs(listObject->y()-y)<5/scale)){
SkyObject *object=listObject->skyObject();
KSPopupMenu *pmenu;
pmenu=new KSPopupMenu();