Fix all warnings for dcrop.cc simpleprocess.cc locallab.cc

This commit is contained in:
Desmis 2017-04-09 08:16:37 +02:00
parent 398e862b2b
commit a53fe8f612
3 changed files with 58 additions and 55 deletions

View File

@ -52,7 +52,7 @@ extern const Settings* settings;
Crop::Crop (ImProcCoordinator* parent, EditDataProvider *editDataProvider, bool isDetailWindow) Crop::Crop (ImProcCoordinator* parent, EditDataProvider *editDataProvider, bool isDetailWindow)
: PipetteBuffer (editDataProvider), origCrop (nullptr), laboCrop (nullptr), labnCrop (nullptr), : PipetteBuffer (editDataProvider), origCrop (nullptr), laboCrop (nullptr), labnCrop (nullptr),
cropImg (nullptr), cbuf_real (nullptr), shbuf_real (nullptr), cshmap (nullptr), transCrop (nullptr), cieCrop (nullptr), cbuffer (nullptr), shbuffer (nullptr), cropImg (nullptr), cbuf_real (nullptr), cshmap (nullptr), shbuf_real (nullptr), transCrop (nullptr), cieCrop (nullptr), cbuffer (nullptr), shbuffer (nullptr),
updating (false), newUpdatePending (false), skip (10), updating (false), newUpdatePending (false), skip (10),
cropx (0), cropy (0), cropw (-1), croph (-1), cropx (0), cropy (0), cropw (-1), croph (-1),
trafx (0), trafy (0), trafw (-1), trafh (-1), trafx (0), trafy (0), trafw (-1), trafh (-1),
@ -832,7 +832,7 @@ void Crop::update (int todo)
locallutili = false; locallutili = false;
int sca = skip; int sca = skip;
bool tyty = false; // bool tyty = false;
int maxspot = settings->nspot + 1; int maxspot = settings->nspot + 1;
if (needslocal ) { if (needslocal ) {
@ -860,10 +860,10 @@ void Crop::update (int todo)
ifstream fich (datalab, ios::in); ifstream fich (datalab, ios::in);
if (fich && parent->versionmip != 0) {//to avoid crash in some cases if (fich && parent->versionmip != 0) {//to avoid crash in some cases
int **dataspotd; // int **dataspotd;
int realspot = params.locallab.nbspot; int realspot = params.locallab.nbspot;
bool tata = true; // bool tata = true;
bool locutili = parent->locutili; bool locutili = parent->locutili;
@ -1054,7 +1054,7 @@ void Crop::update (int todo)
int sp ; int sp ;
sp = realspot; sp = realspot;
bool locutili2 = parent->locutili; // bool locutili2 = parent->locutili;
locallutili = false; locallutili = false;
parent->sps[sp] = sp; parent->sps[sp] = sp;
@ -1285,7 +1285,7 @@ void Crop::update (int todo)
} }
} }
int moderetinex; // int moderetinex;
// parent->ipf.MSR(labnCrop, labnCrop->W, labnCrop->H, 1); // parent->ipf.MSR(labnCrop, labnCrop->W, labnCrop->H, 1);
parent->ipf.chromiLuminanceCurve (this, 1, labnCrop, labnCrop, parent->chroma_acurve, parent->chroma_bcurve, parent->satcurve, parent->lhskcurve, parent->clcurve, parent->lumacurve, utili, autili, butili, ccutili, cclutili, clcutili, dummy, dummy); parent->ipf.chromiLuminanceCurve (this, 1, labnCrop, labnCrop, parent->chroma_acurve, parent->chroma_bcurve, parent->satcurve, parent->lhskcurve, parent->clcurve, parent->lumacurve, utili, autili, butili, ccutili, cclutili, clcutili, dummy, dummy);
parent->ipf.vibrance (labnCrop); parent->ipf.vibrance (labnCrop);

View File

@ -1019,8 +1019,8 @@ private:
bool locutili = false; bool locutili = false;
bool locallutili = false; // bool locallutili = false;
bool localcutili = false; // bool localcutili = false;
if (params.locallab.enabled) { if (params.locallab.enabled) {
MyTime t1, t2; MyTime t1, t2;
@ -1051,10 +1051,10 @@ private:
LUTf lllocalcurve (65536, 0); LUTf lllocalcurve (65536, 0);
LUTf cclocalcurve (65536, 0); LUTf cclocalcurve (65536, 0);
int realspot = params.locallab.nbspot; // int realspot = params.locallab.nbspot;
int maxspot = settings->nspot + 1; int maxspot = settings->nspot + 1;
ifstream fic0 (datalab, ios::in); ifstream fic0 (datalab, ios::in);
float** shbuffer; float** shbuffer = nullptr;
int versionmip = 0; int versionmip = 0;
std::string delim[69] = {"A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", std::string delim[69] = {"A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z",
"a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z",
@ -1073,7 +1073,7 @@ private:
//find the version mip //find the version mip
string line; string line;
string spotline; string spotline;
int cont = 0; // int cont = 0;
while (getline (fic0, line)) { while (getline (fic0, line)) {
spotline = line; spotline = line;
@ -1086,7 +1086,7 @@ private:
} }
if (spotline.substr (0, pos) == "Spot") { if (spotline.substr (0, pos) == "Spot") {
cont = 0; // cont = 0;
} }
@ -1256,7 +1256,7 @@ private:
siz = 69;//avoid crash siz = 69;//avoid crash
} }
int s_cur[siz + 1]; // int s_cur[siz + 1];
int s_datcur[siz + 1]; int s_datcur[siz + 1];
for (int j = 0; j < siz; j++) { for (int j = 0; j < siz; j++) {
@ -1277,7 +1277,7 @@ private:
sizl = 69; sizl = 69;
} }
int s_curl[sizl + 1]; // int s_curl[sizl + 1];
int s_datcurl[sizl + 1]; int s_datcurl[sizl + 1];
for (int j = 0; j < sizl; j++) { for (int j = 0; j < sizl; j++) {
@ -1299,7 +1299,7 @@ private:
sizc = 69; sizc = 69;
} }
int s_curc[sizc + 1]; // int s_curc[sizc + 1];
int s_datcurc[sizc + 1]; int s_datcurc[sizc + 1];
for (int j = 0; j < sizc; j++) { for (int j = 0; j < sizc; j++) {
@ -1322,7 +1322,7 @@ private:
sizh = 69; sizh = 69;
} }
int s_curh[sizh + 1]; // int s_curh[sizh + 1];
int s_datcurh[sizh + 1]; int s_datcurh[sizh + 1];
for (int j = 0; j < sizh; j++) { for (int j = 0; j < sizh; j++) {
@ -1339,21 +1339,21 @@ private:
} }
locallutili = false; // locallutili = false;
int ns; int ns = 0;
int realsp = params.locallab.nbspot; // int realsp = params.locallab.nbspot;
if (fich) { if (fich) {
std::string line; std::string line;
std::string spotline; std::string spotline;
int cont = 0; int cont = 0;
int sizecu; // int sizecu = 0;
int sizell; // int sizell;
int sizelh; // int sizelh;
int sizecc; // int sizecc;
while (getline (fich, line)) { while (getline (fich, line)) {
spotline = line; spotline = line;
@ -1392,71 +1392,71 @@ private:
if (spotline.substr (0, pos) == "curveReti") { if (spotline.substr (0, pos) == "curveReti") {
std::string curstr; std::string curstr;
int longecur; // int longecur;
std::string strend = spotline.substr (posend - 1, 1); std::string strend = spotline.substr (posend - 1, 1);
std::size_t posz = spotline.find (strend); // std::size_t posz = spotline.find (strend);
int longe; // int longe;
for (int sl = 0; sl < 69; sl++) { for (int sl = 0; sl < 69; sl++) {
if (delim[sl] == strend) { if (delim[sl] == strend) {
longe = sl + 1; // longe = sl + 1;
} }
} }
retistrs[ns] = str3; retistrs[ns] = str3;
sizecu = longe; // sizecu = longe;
} }
if (spotline.substr (0, pos) == "curveLL") { if (spotline.substr (0, pos) == "curveLL") {
std::string curstrl; std::string curstrl;
int longecurl; // int longecurl;
std::string strendl = spotline.substr (posend - 1, 1); std::string strendl = spotline.substr (posend - 1, 1);
std::size_t poszl = spotline.find (strendl); // std::size_t poszl = spotline.find (strendl);
int longel; // int longel;
for (int sl = 0; sl < 69; sl++) { for (int sl = 0; sl < 69; sl++) {
if (delim[sl] == strendl) { if (delim[sl] == strendl) {
longel = sl + 1; // longel = sl + 1;
} }
} }
llstrs[ns] = str3; llstrs[ns] = str3;
sizell = longel; // sizell = longel;
} }
if (spotline.substr (0, pos) == "curveLH") { if (spotline.substr (0, pos) == "curveLH") {
std::string curstrh; std::string curstrh;
int longecurh; // int longecurh;
std::string strendh = spotline.substr (posend - 1, 1); std::string strendh = spotline.substr (posend - 1, 1);
std::size_t poszh = spotline.find (strendh); // std::size_t poszh = spotline.find (strendh);
int longeh; // int longeh;
for (int sh = 0; sh < 69; sh++) { for (int sh = 0; sh < 69; sh++) {
if (delim[sh] == strendh) { if (delim[sh] == strendh) {
longeh = sh + 1; // longeh = sh + 1;
} }
} }
lhstrs[ns] = str3; lhstrs[ns] = str3;
sizelh = longeh; // sizelh = longeh;
} }
if (spotline.substr (0, pos) == "curveCC") { if (spotline.substr (0, pos) == "curveCC") {
std::string curstrc; std::string curstrc;
int longecurc; // int longecurc;
std::string strendc = spotline.substr (posend - 1, 1); std::string strendc = spotline.substr (posend - 1, 1);
std::size_t poszc = spotline.find (strendc); // std::size_t poszc = spotline.find (strendc);
int longec; // int longec;
for (int sh = 0; sh < 69; sh++) { for (int sh = 0; sh < 69; sh++) {
if (delim[sh] == strendc) { if (delim[sh] == strendc) {
longec = sh + 1; // longec = sh + 1;
} }
} }
ccstrs[ns] = str3; ccstrs[ns] = str3;
sizecc = longec; // sizecc = longec;
} }
} }

View File

@ -39,7 +39,7 @@ extern Options options;
Locallab::Locallab (): Locallab::Locallab ():
FoldableToolPanel (this, "locallab", M ("TP_LOCALLAB_LABEL"), false, true), FoldableToolPanel (this, "locallab", M ("TP_LOCALLAB_LABEL"), false, true),
EditSubscriber (ET_OBJECTS), lastObject (-1), draggedPointOldAngle (-1000.), EditSubscriber (ET_OBJECTS), lastObject (-1),
expcolor (new MyExpander (true, M ("TP_LOCALLAB_COFR"))), expcolor (new MyExpander (true, M ("TP_LOCALLAB_COFR"))),
expblur (new MyExpander (true, M ("TP_LOCALLAB_BLUFR"))), expblur (new MyExpander (true, M ("TP_LOCALLAB_BLUFR"))),
exptonemap (new MyExpander (true, M ("TP_LOCALLAB_TM"))), exptonemap (new MyExpander (true, M ("TP_LOCALLAB_TM"))),
@ -137,8 +137,8 @@ Locallab::Locallab ():
curvactiv (Gtk::manage (new Gtk::CheckButton (M ("TP_LOCALLAB_CURV")))), curvactiv (Gtk::manage (new Gtk::CheckButton (M ("TP_LOCALLAB_CURV")))),
inversrad (Gtk::manage (new Gtk::CheckButton (M ("TP_LOCALLAB_INVERS")))), inversrad (Gtk::manage (new Gtk::CheckButton (M ("TP_LOCALLAB_INVERS")))),
inversret (Gtk::manage (new Gtk::CheckButton (M ("TP_LOCALLAB_INVERS")))), inversret (Gtk::manage (new Gtk::CheckButton (M ("TP_LOCALLAB_INVERS")))),
inverssha (Gtk::manage (new Gtk::CheckButton (M ("TP_LOCALLAB_INVERS")))) inverssha (Gtk::manage (new Gtk::CheckButton (M ("TP_LOCALLAB_INVERS")))),
draggedPointOldAngle (-1000.)
{ {
CurveListener::setMulti (true); CurveListener::setMulti (true);
@ -653,14 +653,15 @@ Locallab::Locallab ():
// Instantiating the Editing geometry; positions will be initialized later // Instantiating the Editing geometry; positions will be initialized later
Line *hLine, *vLine, *locYLine[2], *locXLine[2]; // Line *hLine, *vLine, *locYLine[2], *locXLine[2];
Line *locYLine[2], *locXLine[2];
Circle *centerCircle; Circle *centerCircle;
// Arcellipse *oneellipse; // Arcellipse *oneellipse;
Beziers *onebeziers[3]; Beziers *onebeziers[3] = {};
Beziers *twobeziers[3]; Beziers *twobeziers[3] = {};
Beziers *thrbeziers[3]; Beziers *thrbeziers[3] = {};
Beziers *foubeziers[3]; Beziers *foubeziers[3] = {};
float innw = 0.7f; float innw = 0.7f;
// Visible geometry // Visible geometry
locXLine[0] = new Line(); locXLine[0] = new Line();
@ -1208,6 +1209,7 @@ bool Locallab::localretComputed_ ()
listener->panelChanged (EvlocallabLHshape, M ("")); listener->panelChanged (EvlocallabLHshape, M (""));
} }
return false;
} }
@ -1902,11 +1904,12 @@ void Locallab::updateGeometry (const int centerX_, const int centerY_, const int
decayXL = decayX; decayXL = decayX;
} }
Line *currLine; // Line *currLine;
Circle *currCircle; // Circle *currCircle;
// Arcellipse *currArcellipse; // Arcellipse *currArcellipse;
Beziers *currBeziers; // Beziers *currBeziers;
double decay; double decay;
/*
const auto updateLine = [&] (Geometry * geometry, const float radius, const float begin, const float end) { const auto updateLine = [&] (Geometry * geometry, const float radius, const float begin, const float end) {
const auto line = static_cast<Line*> (geometry); const auto line = static_cast<Line*> (geometry);
line->begin = PolarCoord (radius, -degree_ + begin); line->begin = PolarCoord (radius, -degree_ + begin);
@ -1914,7 +1917,7 @@ void Locallab::updateGeometry (const int centerX_, const int centerY_, const int
line->end = PolarCoord (radius, -degree_ + end); line->end = PolarCoord (radius, -degree_ + end);
line->end += origin; line->end += origin;
}; };
*/
const auto updateLineWithDecay = [&] (Geometry * geometry, const float radius, const float decal, const float offSetAngle) { const auto updateLineWithDecay = [&] (Geometry * geometry, const float radius, const float decal, const float offSetAngle) {
const auto line = static_cast<Line*> (geometry); //180 const auto line = static_cast<Line*> (geometry); //180
line->begin = PolarCoord (radius, -degree_ + decal) + PolarCoord (decay, -degree_ + offSetAngle); line->begin = PolarCoord (radius, -degree_ + decal) + PolarCoord (decay, -degree_ + offSetAngle);