diff --git a/rtgui/exifpanel.cc b/rtgui/exifpanel.cc
index 88d0a062b..2decd48eb 100644
--- a/rtgui/exifpanel.cc
+++ b/rtgui/exifpanel.cc
@@ -430,7 +430,7 @@ void ExifPanel::addPressed ()
} else {
tcombo->set_active_text (sel);
- if (tcombo->get_active () < 0) {
+ if (!tcombo->get_active ()) {
tcombo->append_text (sel);
tcombo->set_active_text (sel);
}
diff --git a/rtgui/thresholdselector.cc b/rtgui/thresholdselector.cc
index 34d5bf14a..59320dd2a 100644
--- a/rtgui/thresholdselector.cc
+++ b/rtgui/thresholdselector.cc
@@ -17,9 +17,11 @@
* along with RawTherapee. If not, see .
*/
+#include
+#include
+
#include "thresholdselector.h"
#include "multilangmgr.h"
-#include
#include "mycurve.h"
ThresholdSelector::ThresholdSelector(double minValueBottom, double maxValueBottom, double defBottom, Glib::ustring labelBottom, unsigned int precisionBottom,
@@ -551,7 +553,7 @@ void ThresholdSelector::findLitCursor(int posX, int posY)
// we use minValTop since if this block is executed, it means that we are in a simple Threshold where both bottom and top range are the same
double cursorX = (posX - hb) * (maxValTop - minValTop) / (w - 2 * hb) + minValTop;
- if (cursorX > positions[TS_TOPRIGHT] || abs(cursorX - positions[TS_TOPRIGHT]) < abs(cursorX - positions[TS_TOPLEFT])) {
+ if (cursorX > positions[TS_TOPRIGHT] || std::fabs(cursorX - positions[TS_TOPRIGHT]) < std::fabs(cursorX - positions[TS_TOPLEFT])) {
litCursor = TS_TOPRIGHT;
}
}
@@ -564,7 +566,7 @@ void ThresholdSelector::findLitCursor(int posX, int posY)
// we use minValTop since if this block is executed, it means that we are in a simple Threshold where both bottom and top range are the same
double cursorX = (posX - hb) * (maxValTop - minValTop) / (w - 2 * hb) + minValTop;
- if (cursorX > positions[TS_BOTTOMRIGHT] || abs(cursorX - positions[TS_BOTTOMRIGHT]) < abs(cursorX - positions[TS_BOTTOMLEFT])) {
+ if (cursorX > positions[TS_BOTTOMRIGHT] || std::fabs(cursorX - positions[TS_BOTTOMRIGHT]) < std::fabs(cursorX - positions[TS_BOTTOMLEFT])) {
litCursor = TS_BOTTOMRIGHT;
}
}