fixed more warnings in rtgui (reported by gcc but not clang)

This commit is contained in:
Alberto Griggio
2017-04-01 16:43:32 +02:00
parent a3561049ed
commit 27e822fdae
14 changed files with 34 additions and 34 deletions

View File

@@ -398,7 +398,7 @@ void MyDiagonalCurve::draw (int handle)
double y2 = double(graphY) - 1.5 - double(graphH - 3) * points[pos + 1]; // project (curve.y.at(i), 0, 1, graphH);
// set the color of the line when the point is snapped to the cage
if (curve.x.size() == nbPoints && snapToElmt >= 1000 && ((i == (snapToElmt - 1000)) || (i == (snapToElmt - 999)))) {
if (curve.x.size() == nbPoints && snapToElmt >= 1000 && ((int(i) == (snapToElmt - 1000)) || (int(i) == (snapToElmt - 999)))) {
cr->set_source_rgb (1.0, 0.0, 0.0);
} else {
cr->set_source_rgb (c.get_red(), c.get_green(), c.get_blue());
@@ -606,7 +606,7 @@ bool MyDiagonalCurve::handleEvents (GdkEvent* event)
edited_point = lit_point;
std::vector<CoordinateAdjuster::Boundaries> newBoundaries(2);
unsigned int size = curve.x.size();
int size = curve.x.size();
if (edited_point == 0) {
newBoundaries.at(0).minVal = 0.;
@@ -655,7 +655,7 @@ bool MyDiagonalCurve::handleEvents (GdkEvent* event)
draw (lit_point);
std::vector<CoordinateAdjuster::Boundaries> newBoundaries;
newBoundaries.resize(2);
unsigned int size = curve.x.size();
int size = curve.x.size();
if (edited_point == 0) {
newBoundaries.at(0).minVal = 0.;
@@ -888,7 +888,7 @@ bool MyDiagonalCurve::handleEvents (GdkEvent* event)
} else {
// snapping point to specific values
if (snapTo && curve.x.at(grab_point) != -1.) {
if (grab_point > 0 && grab_point < (curve.y.size() - 1)) {
if (grab_point > 0 && unsigned(grab_point) < (curve.y.size() - 1)) {
double prevX = curve.x.at(grab_point - 1);
double prevY = curve.y.at(grab_point - 1);
double nextX = curve.x.at(grab_point + 1);
@@ -910,7 +910,7 @@ bool MyDiagonalCurve::handleEvents (GdkEvent* event)
}
}
if (grab_point < (curve.y.size() - 1)) {
if (grab_point < int(curve.y.size() - 1)) {
int nextP = grab_point + 1;
if (snapCoordinateY(curve.y.at(nextP), ugpY)) {
@@ -1208,7 +1208,7 @@ void MyDiagonalCurve::pipetteDrag(EditDataProvider *provider, int modifierKey)
// snapping point to specific values
if (snapTo && curve.x.at(grab_point) != -1.) {
if (grab_point > 0 && grab_point < (curve.y.size() - 1)) {
if (grab_point > 0 && unsigned(grab_point) < (curve.y.size() - 1)) {
double prevX = curve.x.at(grab_point - 1);
double prevY = curve.y.at(grab_point - 1);
double nextX = curve.x.at(grab_point + 1);
@@ -1230,7 +1230,7 @@ void MyDiagonalCurve::pipetteDrag(EditDataProvider *provider, int modifierKey)
}
}
if (grab_point < (curve.y.size() - 1)) {
if (grab_point < int(curve.y.size() - 1)) {
int nextP = grab_point + 1;
if (snapCoordinateY(curve.y.at(nextP), ugpY)) {