fixed more warnings in rtgui (reported by gcc but not clang)
This commit is contained in:
@@ -781,7 +781,7 @@ Glib::ustring BatchQueue::calcAutoFileNameBase (const Glib::ustring& origFileNam
|
||||
|
||||
if (options.savePathTemplate[ix] == 'p') {
|
||||
ix++;
|
||||
int i = options.savePathTemplate[ix] - '0';
|
||||
unsigned int i = options.savePathTemplate[ix] - '0';
|
||||
|
||||
if (i < pa.size()) {
|
||||
path = path + pa[pa.size() - i - 1] + '/';
|
||||
@@ -790,7 +790,7 @@ Glib::ustring BatchQueue::calcAutoFileNameBase (const Glib::ustring& origFileNam
|
||||
ix++;
|
||||
} else if (options.savePathTemplate[ix] == 'd') {
|
||||
ix++;
|
||||
int i = options.savePathTemplate[ix] - '0';
|
||||
unsigned i = options.savePathTemplate[ix] - '0';
|
||||
|
||||
if (i < da.size()) {
|
||||
path = path + da[da.size() - i - 1];
|
||||
|
@@ -35,7 +35,7 @@ CheckBox::CheckBox (Glib::ustring label, bool const& multiImageVal)
|
||||
void CheckBox::buttonToggled ()
|
||||
{
|
||||
|
||||
CheckValue newValue;
|
||||
CheckValue newValue = CheckValue::unchanged;
|
||||
|
||||
if (multiImage) {
|
||||
if (get_inconsistent()) {
|
||||
|
@@ -1627,7 +1627,7 @@ void CropWindow::expose (Cairo::RefPtr<Cairo::Context> cr)
|
||||
int delta = 0;
|
||||
// for efficiency, pre-calculate currWS_L as it may be needed in both
|
||||
// if (showch) and if (showcs) branches
|
||||
int currWS_L;
|
||||
int currWS_L = 0;
|
||||
|
||||
if (showL && (showch || showcs)) {
|
||||
currWS_L = (int)(0.299f * currWS[0] + 0.587f * currWS[1] + 0.114f * currWS[2]);
|
||||
|
@@ -348,7 +348,7 @@ void DirBrowser::updateDir (const Gtk::TreeModel::iterator& iter)
|
||||
auto dir = Gio::File::create_for_path (iter->get_value (dtColumns.dirname));
|
||||
auto subDirs = listSubDirs (dir, options.fbShowHidden);
|
||||
|
||||
for (int i = 0; i < subDirs.size(); i++) {
|
||||
for (size_t i = 0; i < subDirs.size(); i++) {
|
||||
bool found = false;
|
||||
|
||||
for (Gtk::TreeModel::iterator it = iter->children().begin(); it != iter->children().end() && !found ; ++it) {
|
||||
|
@@ -36,8 +36,8 @@ public:
|
||||
double shutterTo;
|
||||
double focalFrom;
|
||||
double focalTo;
|
||||
int isoFrom;
|
||||
int isoTo;
|
||||
unsigned isoFrom;
|
||||
unsigned isoTo;
|
||||
|
||||
bool filterFNumber;
|
||||
bool filterShutter;
|
||||
|
@@ -405,7 +405,7 @@ FileBrowser::FileBrowser ()
|
||||
colorlabel[i]->signal_activate().connect (sigc::bind(sigc::mem_fun(*this, &FileBrowser::menuItemActivated), colorlabel[i]));
|
||||
}
|
||||
|
||||
for (int i = 0; i < mMenuExtProgs.size(); i++) {
|
||||
for (size_t i = 0; i < mMenuExtProgs.size(); i++) {
|
||||
amiExtProg[i]->signal_activate().connect (sigc::bind(sigc::mem_fun(*this, &FileBrowser::menuItemActivated), amiExtProg[i]));
|
||||
}
|
||||
|
||||
@@ -730,14 +730,14 @@ void FileBrowser::menuItemActivated (Gtk::MenuItem* m)
|
||||
return;
|
||||
}
|
||||
|
||||
for (int j = 0; j < mMenuExtProgs.size(); j++) {
|
||||
for (size_t j = 0; j < mMenuExtProgs.size(); j++) {
|
||||
if (m == amiExtProg[j]) {
|
||||
const auto pAct = mMenuExtProgs[m->get_label()];
|
||||
|
||||
// Build vector of all file names
|
||||
std::vector<Glib::ustring> selFileNames;
|
||||
|
||||
for (int i = 0; i < mselected.size(); i++) {
|
||||
for (size_t i = 0; i < mselected.size(); i++) {
|
||||
Glib::ustring fn = mselected[i]->thumbnail->getFileName();
|
||||
|
||||
// Maybe batch processed version
|
||||
@@ -1505,11 +1505,11 @@ bool FileBrowser::checkFilter (ThumbBrowserEntryBase* entryb) // true -> entry
|
||||
int iFilenameMatch = 0;
|
||||
std::vector<Glib::ustring> vFilterStrings = Glib::Regex::split_simple(",", decodedQueryFileName.uppercase());
|
||||
|
||||
for(int i = 0; i < vFilterStrings.size(); i++) {
|
||||
for(size_t i = 0; i < vFilterStrings.size(); i++) {
|
||||
// ignore empty vFilterStrings. Otherwise filter will always return true if
|
||||
// e.g. filter.queryFileName ends on "," and will stop being a filter
|
||||
if (!vFilterStrings.at(i).empty()) {
|
||||
if (FileName.find(vFilterStrings.at(i)) != -1) {
|
||||
if (FileName.find(vFilterStrings.at(i)) != Glib::ustring::npos) {
|
||||
iFilenameMatch++;
|
||||
}
|
||||
}
|
||||
|
@@ -748,12 +748,12 @@ void FileCatalog::previewReady (int dir_id, FileBrowserEntry* fdn)
|
||||
dirEFS.shutterTo = cfs->shutter;
|
||||
}
|
||||
|
||||
if (cfs->iso > 0 && (int)cfs->iso < dirEFS.isoFrom) {
|
||||
dirEFS.isoFrom = (int)cfs->iso;
|
||||
if (cfs->iso > 0 && cfs->iso < dirEFS.isoFrom) {
|
||||
dirEFS.isoFrom = cfs->iso;
|
||||
}
|
||||
|
||||
if (cfs->iso > 0 && (int)cfs->iso > dirEFS.isoTo) {
|
||||
dirEFS.isoTo = (int)cfs->iso;
|
||||
if (cfs->iso > 0 && cfs->iso > dirEFS.isoTo) {
|
||||
dirEFS.isoTo = cfs->iso;
|
||||
}
|
||||
|
||||
if (cfs->focalLen < dirEFS.focalFrom) {
|
||||
|
@@ -1478,7 +1478,7 @@ void BackBuffer::copyRGBCharData(const unsigned char *srcData, int srcX, int src
|
||||
return;
|
||||
}
|
||||
|
||||
for (unsigned int i = 0; i < (unsigned int)(srcH); ++i) {
|
||||
for (int i = 0; i < srcH; ++i) {
|
||||
if (dstY + i >= surfH) {
|
||||
break;
|
||||
}
|
||||
@@ -1486,7 +1486,7 @@ void BackBuffer::copyRGBCharData(const unsigned char *srcData, int srcX, int src
|
||||
src = srcData + i * srcRowStride;
|
||||
dst = dstData + ((dstY + i) * surfW + dstX) * 4;
|
||||
|
||||
for (unsigned int j = 0; j < (unsigned int)(srcW); ++j) {
|
||||
for (int j = 0; j < srcW; ++j) {
|
||||
if (dstX + j >= surfW) {
|
||||
break;
|
||||
}
|
||||
|
@@ -114,7 +114,7 @@ public:
|
||||
class ConnectionBlocker
|
||||
{
|
||||
public:
|
||||
explicit ConnectionBlocker (Gtk::Widget *associatedWidget, sigc::connection& connection) : connection (associatedWidget ? &connection : nullptr)
|
||||
explicit ConnectionBlocker (Gtk::Widget *associatedWidget, sigc::connection& connection) : connection (associatedWidget ? &connection : nullptr), wasBlocked(false)
|
||||
{
|
||||
if (this->connection) {
|
||||
wasBlocked = connection.block();
|
||||
|
@@ -1007,7 +1007,7 @@ SSEFUNCTION void HistogramArea::updateBackBuffer ()
|
||||
// does not take into account 0 and 255 values
|
||||
// them are handled separately
|
||||
|
||||
int fullhistheight = 0;
|
||||
unsigned int fullhistheight = 0;
|
||||
|
||||
for (int i = 1; i < 255; i++) {
|
||||
if (needLuma && lhisttemp[i] > fullhistheight) {
|
||||
@@ -1042,7 +1042,7 @@ SSEFUNCTION void HistogramArea::updateBackBuffer ()
|
||||
vint iv = (vint)ZEROV;
|
||||
#endif
|
||||
|
||||
for (int i = 0; i < fullhistheight; i++) {
|
||||
for (unsigned i = 0; i < fullhistheight; i++) {
|
||||
#ifdef __SSE2__
|
||||
vint areatempv = (vint)ZEROV;
|
||||
|
||||
|
@@ -175,7 +175,7 @@ bool MyCurve::snapCoordinateY(double testedVal, double realVal)
|
||||
|
||||
float MyCurve::getVal(LUTf &curve, int x)
|
||||
{
|
||||
if ((graphW - 2) == curve.getSize()) {
|
||||
if (size_t(graphW - 2) == curve.getSize()) {
|
||||
return curve[x];
|
||||
} else {
|
||||
return curve.getVal01(float(x) / (graphW - 3));
|
||||
|
@@ -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)) {
|
||||
|
@@ -711,7 +711,7 @@ bool MyFlatCurve::handleEvents (GdkEvent* event)
|
||||
setDirty(true);
|
||||
draw ();
|
||||
std::vector<CoordinateAdjuster::Boundaries> newBoundaries(4);
|
||||
unsigned int size = curve.x.size();
|
||||
int size = curve.x.size();
|
||||
|
||||
if (edited_point == 0) {
|
||||
newBoundaries.at(0).minVal = 0.;
|
||||
@@ -761,7 +761,7 @@ bool MyFlatCurve::handleEvents (GdkEvent* event)
|
||||
setDirty(true);
|
||||
draw ();
|
||||
std::vector<CoordinateAdjuster::Boundaries> newBoundaries(4);
|
||||
unsigned int size = curve.x.size();
|
||||
int size = curve.x.size();
|
||||
|
||||
if (edited_point == 0) {
|
||||
newBoundaries.at(0).minVal = 0.;
|
||||
@@ -1544,7 +1544,7 @@ void MyFlatCurve::movePoint(bool moveX, bool moveY, bool pipetteDrag)
|
||||
}
|
||||
|
||||
if (curve.y.size() > 2) {
|
||||
if (lit_point == (curve.y.size() - 1)) {
|
||||
if (lit_point == int(curve.y.size()) - 1) {
|
||||
if (snapCoordinateY(curve.y.at(0), ugpY)) {
|
||||
snapToElmt = 0;
|
||||
}
|
||||
|
@@ -107,8 +107,8 @@ void PopUpCommon::entrySelected (int i)
|
||||
|
||||
void PopUpCommon::setItemSensitivity (int index, bool isSensitive) {
|
||||
const auto items = menu->get_children ();
|
||||
if (index < items.size ()) {
|
||||
items[index]->set_sensitive (isSensitive);
|
||||
if (size_t(index) < items.size ()) {
|
||||
items[size_t(index)]->set_sensitive (isSensitive);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user