From c8779c04f52c3f4525646df5a459491168d8c8e4 Mon Sep 17 00:00:00 2001 From: heckflosse Date: Wed, 6 Jul 2016 13:04:24 +0200 Subject: [PATCH] Fix all - 2 cppcheck performance hints --- rtengine/camconst.cc | 4 ++-- rtengine/color.cc | 6 ++---- rtengine/colortemp.cc | 3 +-- rtengine/dcrop.cc | 11 +++-------- rtengine/dfmanager.cc | 18 +++++++++--------- rtengine/ffmanager.cc | 16 ++++++++-------- rtengine/imageio.cc | 2 +- rtengine/improcfun.cc | 6 +----- rtengine/ipwavelet.cc | 18 +++--------------- rtengine/myfile.cc | 15 +++++++-------- rtengine/processingjob.h | 8 ++------ rtengine/procparams.cc | 6 +++--- rtengine/rawimage.cc | 2 +- rtengine/rawimage.h | 2 +- rtengine/shmap.cc | 2 +- rtexif/rtexif.cc | 6 +++--- rtexif/rtexif.h | 6 +++--- rtgui/batchqueue.cc | 2 +- rtgui/batchqueue.h | 2 +- rtgui/batchqueueentry.cc | 3 +-- rtgui/bqentryupdater.cc | 4 ++-- rtgui/coloredbar.cc | 2 +- rtgui/cropwindow.cc | 4 ++-- rtgui/dirbrowser.cc | 12 ++++++------ rtgui/editwindow.cc | 4 ++-- rtgui/exifpanel.cc | 10 +++++----- rtgui/favoritbrowser.cc | 2 +- rtgui/filebrowser.cc | 4 ++-- rtgui/filterpanel.cc | 16 ++++++++-------- rtgui/history.cc | 4 ++-- rtgui/imagearea.cc | 2 +- rtgui/iptcpanel.cc | 6 +++--- rtgui/mycurve.cc | 3 +-- rtgui/mydiagonalcurve.cc | 8 ++++---- rtgui/myflatcurve.cc | 16 ++++++++-------- rtgui/paramsedited.cc | 4 ++-- rtgui/previewhandler.cc | 2 +- rtgui/profilestore.cc | 2 +- rtgui/rtwindow.cc | 2 +- rtgui/thresholdselector.cc | 8 ++++---- rtgui/thumbbrowserbase.cc | 3 +-- rtgui/thumbnail.cc | 2 +- rtgui/thumbnail.h | 2 +- 43 files changed, 114 insertions(+), 146 deletions(-) diff --git a/rtengine/camconst.cc b/rtengine/camconst.cc index 8290fe085..9e49293e1 100644 --- a/rtengine/camconst.cc +++ b/rtengine/camconst.cc @@ -428,7 +428,7 @@ CameraConst::get_Levels(struct camera_const_levels & lvl, int bw, int iso, float std::map::iterator best_it = mLevels[bw].begin(); if (iso > 0) { - for (it = mLevels[bw].begin(); it != mLevels[bw].end(); it++) { + for (it = mLevels[bw].begin(); it != mLevels[bw].end(); ++it) { if (abs(it->first - iso) <= abs(best_it->first - iso)) { best_it = it; } else { @@ -487,7 +487,7 @@ CameraConst::get_Levels(struct camera_const_levels & lvl, int bw, int iso, float if (it == mApertureScaling.end()) { std::map::reverse_iterator it; - for (it = mApertureScaling.rbegin(); it != mApertureScaling.rend(); it++) { + for (it = mApertureScaling.rbegin(); it != mApertureScaling.rend(); ++it) { if (it->first > fnumber) { scaling = it->second; } else { diff --git a/rtengine/color.cc b/rtengine/color.cc index c5874d110..c822a6f33 100644 --- a/rtengine/color.cc +++ b/rtengine/color.cc @@ -1361,12 +1361,10 @@ void Color::interpolateRGBColor (float realL, float iplow, float iphigh, int alg float bal, balH, cal, calH, calm; bal = balH = balance; cal = calH = calm = 1.f - chromat; - float med = (iphigh + iplow) / 2.f; - float medH = (iphigh + iplow) / 2.f; + float med = 1.f; + float medH = 0.f; float medL = (iphigh + iplow) / 2.f; - med = 1.f; - medH = 0.f; //new algo for 2 colors float calan; calan = chromat; diff --git a/rtengine/colortemp.cc b/rtengine/colortemp.cc index c99e4bd41..8d3847e79 100644 --- a/rtengine/colortemp.cc +++ b/rtengine/colortemp.cc @@ -114,9 +114,8 @@ void ColorTemp::clip (double &temp, double &green, double &equal) } } -ColorTemp::ColorTemp (double mulr, double mulg, double mulb, double e) : equal(e) +ColorTemp::ColorTemp (double mulr, double mulg, double mulb, double e) : equal(e), method("Custom") { - method = "Custom"; mul2temp (mulr, mulg, mulb, equal, temp, green); } diff --git a/rtengine/dcrop.cc b/rtengine/dcrop.cc index bfe9c1c9a..577a3f4a6 100644 --- a/rtengine/dcrop.cc +++ b/rtengine/dcrop.cc @@ -888,14 +888,9 @@ void Crop::update (int todo) realtile = 12; } - int tilesize; - int overlap; - tilesize = 1024; - overlap = 128; - tilesize = 128 * realtile; - //overlap=(int) tilesize*params->wavelet.overl; - overlap = (int) tilesize * 0.125f; - // printf("overl=%d\n",overlap); + int tilesize = 128 * realtile; + int overlap = (int) tilesize * 0.125f; + int numtiles_W, numtiles_H, tilewidth, tileheight, tileWskip, tileHskip; parent->ipf.Tile_calc (tilesize, overlap, kall, labnCrop->W, labnCrop->H, numtiles_W, numtiles_H, tilewidth, tileheight, tileWskip, tileHskip); diff --git a/rtengine/dfmanager.cc b/rtengine/dfmanager.cc index 10d2dff30..e06ac27e2 100644 --- a/rtengine/dfmanager.cc +++ b/rtengine/dfmanager.cc @@ -158,7 +158,7 @@ void dfInfo::updateRawImage() int nFiles = 1; // First file data already loaded - for( iName++; iName != pathNames.end(); iName++) { + for( ++iName; iName != pathNames.end(); ++iName) { RawImage* temp = new RawImage(*iName); if( !temp->loadRaw(true)) { @@ -300,7 +300,7 @@ void DFManager::init( Glib::ustring pathname ) } // Where multiple shots exist for same group, move filename to list - for( dfList_t::iterator iter = dfList.begin(); iter != dfList.end(); iter++ ) { + for( dfList_t::iterator iter = dfList.begin(); iter != dfList.end(); ++iter ) { dfInfo &i = iter->second; if( !i.pathNames.empty() && !i.pathname.empty() ) { @@ -314,7 +314,7 @@ void DFManager::init( Glib::ustring pathname ) } else { printf( "%s: MEAN of \n ", i.key().c_str()); - for( std::list::iterator iter = i.pathNames.begin(); iter != i.pathNames.end(); iter++ ) { + for( std::list::iterator iter = i.pathNames.begin(); iter != i.pathNames.end(); ++iter ) { printf( "%s, ", iter->c_str() ); } @@ -391,7 +391,7 @@ dfInfo* DFManager::addFileInfo (const Glib::ustring& filename, bool pool) iter = dfList.insert(std::pair< std::string, dfInfo>( key, n ) ); } else { while( iter != dfList.end() && iter->second.key() == key && ABS(iter->second.timestamp - idata.getDateTimeAsTS()) > 60 * 60 * 6 ) { // 6 hour difference - iter++; + ++iter; } if( iter != dfList.end() ) { @@ -414,7 +414,7 @@ void DFManager::getStat( int &totFiles, int &totTemplates) totFiles = 0; totTemplates = 0; - for( dfList_t::iterator iter = dfList.begin(); iter != dfList.end(); iter++ ) { + for( dfList_t::iterator iter = dfList.begin(); iter != dfList.end(); ++iter ) { dfInfo &i = iter->second; if( i.pathname.empty() ) { @@ -443,7 +443,7 @@ dfInfo* DFManager::find( const std::string &mak, const std::string &mod, int iso dfList_t::iterator bestMatch = iter; time_t bestDeltaTime = ABS(iter->second.timestamp - t); - for(iter++; iter != dfList.end() && !key.compare( iter->second.key() ); iter++ ) { + for(++iter; iter != dfList.end() && !key.compare( iter->second.key() ); ++iter ) { time_t d = ABS(iter->second.timestamp - t ); if( d < bestDeltaTime ) { @@ -458,7 +458,7 @@ dfInfo* DFManager::find( const std::string &mak, const std::string &mod, int iso dfList_t::iterator bestMatch = iter; double bestD = iter->second.distance( mak, mod, isospeed, shut ); - for( iter++; iter != dfList.end(); iter++ ) { + for( ++iter; iter != dfList.end(); ++iter ) { double d = iter->second.distance( mak, mod, isospeed, shut ); if( d < bestD ) { @@ -484,7 +484,7 @@ RawImage* DFManager::searchDarkFrame( const std::string &mak, const std::string RawImage* DFManager::searchDarkFrame( const Glib::ustring filename ) { - for ( dfList_t::iterator iter = dfList.begin(); iter != dfList.end(); iter++ ) { + for ( dfList_t::iterator iter = dfList.begin(); iter != dfList.end(); ++iter ) { if( iter->second.pathname.compare( filename ) == 0 ) { return iter->second.getRawImage(); } @@ -500,7 +500,7 @@ RawImage* DFManager::searchDarkFrame( const Glib::ustring filename ) } std::vector *DFManager::getHotPixels ( const Glib::ustring filename ) { - for ( dfList_t::iterator iter = dfList.begin(); iter != dfList.end(); iter++ ) { + for ( dfList_t::iterator iter = dfList.begin(); iter != dfList.end(); ++iter ) { if( iter->second.pathname.compare( filename ) == 0 ) { return &iter->second.getHotPixels(); } diff --git a/rtengine/ffmanager.cc b/rtengine/ffmanager.cc index c5461f3e9..6a653eb84 100644 --- a/rtengine/ffmanager.cc +++ b/rtengine/ffmanager.cc @@ -158,7 +158,7 @@ void ffInfo::updateRawImage() int nFiles = 1; // First file data already loaded - for( iName++; iName != pathNames.end(); iName++) { + for( ++iName; iName != pathNames.end(); ++iName) { RawImage* temp = new RawImage(*iName); if( !temp->loadRaw(true)) { @@ -268,7 +268,7 @@ void FFManager::init( Glib::ustring pathname ) } // Where multiple shots exist for same group, move filename to list - for( ffList_t::iterator iter = ffList.begin(); iter != ffList.end(); iter++ ) { + for( ffList_t::iterator iter = ffList.begin(); iter != ffList.end(); ++iter ) { ffInfo &i = iter->second; if( !i.pathNames.empty() && !i.pathname.empty() ) { @@ -282,7 +282,7 @@ void FFManager::init( Glib::ustring pathname ) } else { printf( "%s: MEAN of \n ", i.key().c_str()); - for( std::list::iterator iter = i.pathNames.begin(); iter != i.pathNames.end(); iter++ ) { + for( std::list::iterator iter = i.pathNames.begin(); iter != i.pathNames.end(); ++iter ) { printf( "%s, ", iter->c_str() ); } @@ -361,7 +361,7 @@ ffInfo* FFManager::addFileInfo (const Glib::ustring& filename, bool pool) iter = ffList.insert(std::pair< std::string, ffInfo>( key, n ) ); } else { while( iter != ffList.end() && iter->second.key() == key && ABS(iter->second.timestamp - ri.get_timestamp()) > 60 * 60 * 6 ) { // 6 hour difference - iter++; + ++iter; } if( iter != ffList.end() ) { @@ -384,7 +384,7 @@ void FFManager::getStat( int &totFiles, int &totTemplates) totFiles = 0; totTemplates = 0; - for( ffList_t::iterator iter = ffList.begin(); iter != ffList.end(); iter++ ) { + for( ffList_t::iterator iter = ffList.begin(); iter != ffList.end(); ++iter ) { ffInfo &i = iter->second; if( i.pathname.empty() ) { @@ -413,7 +413,7 @@ ffInfo* FFManager::find( const std::string &mak, const std::string &mod, const s ffList_t::iterator bestMatch = iter; time_t bestDeltaTime = ABS(iter->second.timestamp - t); - for(iter++; iter != ffList.end() && !key.compare( iter->second.key() ); iter++ ) { + for(++iter; iter != ffList.end() && !key.compare( iter->second.key() ); ++iter ) { time_t d = ABS(iter->second.timestamp - t ); if( d < bestDeltaTime ) { @@ -428,7 +428,7 @@ ffInfo* FFManager::find( const std::string &mak, const std::string &mod, const s ffList_t::iterator bestMatch = iter; double bestD = iter->second.distance( mak, mod, len, focal, apert ); - for( iter++; iter != ffList.end(); iter++ ) { + for( ++iter; iter != ffList.end(); ++iter ) { double d = iter->second.distance( mak, mod, len, focal, apert ); if( d < bestD ) { @@ -454,7 +454,7 @@ RawImage* FFManager::searchFlatField( const std::string &mak, const std::string RawImage* FFManager::searchFlatField( const Glib::ustring filename ) { - for ( ffList_t::iterator iter = ffList.begin(); iter != ffList.end(); iter++ ) { + for ( ffList_t::iterator iter = ffList.begin(); iter != ffList.end(); ++iter ) { if( iter->second.pathname.compare( filename ) == 0 ) { return iter->second.getRawImage(); } diff --git a/rtengine/imageio.cc b/rtengine/imageio.cc index 9fdfc82fb..36a3d3601 100644 --- a/rtengine/imageio.cc +++ b/rtengine/imageio.cc @@ -136,7 +136,7 @@ void ImageIO::setMetadata (const rtexif::TagDirectory* eroot, const rtengine::pr iptc = iptc_data_new (); - for (rtengine::procparams::IPTCPairs::const_iterator i = iptcc.begin(); i != iptcc.end(); i++) { + for (rtengine::procparams::IPTCPairs::const_iterator i = iptcc.begin(); i != iptcc.end(); ++i) { if (i->first == "Keywords" && !(i->second.empty())) { for (unsigned int j = 0; j < i->second.size(); j++) { IptcDataSet * ds = iptc_dataset_new (); diff --git a/rtengine/improcfun.cc b/rtengine/improcfun.cc index 8da4f689a..c30e626b9 100644 --- a/rtengine/improcfun.cc +++ b/rtengine/improcfun.cc @@ -611,8 +611,7 @@ void ImProcFunctions::ciecam_02 (CieImage* ncie, double adap, int begh, int endh Jpro = (CAMBrightCurveJ[(float)(Jpro * 327.68)]) / 327.68; //ligthness CIECAM02 + contrast double sres; double Sp = spro / 100.0; - double parsat = 1.5; - parsat = 1.5; //parsat=1.5 =>saturation ; 1.8 => chroma ; 2.5 => colorfullness (personal evaluation) + double parsat = 1.5; //parsat=1.5 =>saturation ; 1.8 => chroma ; 2.5 => colorfullness (personal evaluation) if(schr == -100.0) { schr = -99.8; @@ -4964,7 +4963,6 @@ void ImProcFunctions::toningsmh (float r, float g, float b, float &ro, float &go if(s > s_1) ksat=SQR((1.f/(s_1-1.f))*s - (1.f/(s_1-1.f))); } */ - ksat = 1.f; float kl = 1.f; float rlo = 1.f; //0.4 0.5 float rlm = 1.5f; //1.1 @@ -5235,7 +5233,6 @@ void ImProcFunctions::toning2col (float r, float g, float b, float &ro, float &g if(s > s_1) ksat=SQR((1.f/(s_1-1.f))*s - (1.f/(s_1-1.f))); } */ - ksat = 1.f; float kl = 1.f; float rlo = 1.f; float rlh = 2.2f; @@ -5303,7 +5300,6 @@ void ImProcFunctions::toning2col (float r, float g, float b, float &ro, float &g //high tones float kh = 1.f; - kh = 1.f; float aa0, bb0; //fixed value of reducac ==0.4; secondeg_begin (reducac, iphigh, aa0, bb0); diff --git a/rtengine/ipwavelet.cc b/rtengine/ipwavelet.cc index 4e433b453..ab29308c8 100644 --- a/rtengine/ipwavelet.cc +++ b/rtengine/ipwavelet.cc @@ -574,15 +574,8 @@ SSEFUNCTION void ImProcFunctions::ip_wavelet(LabImage * lab, LabImage * dst, int realtile = 12; } - int tilesize; - int overlap; - tilesize = 1024; - overlap = 128; - //tilesize=128*params->wavelet.tiles; - tilesize = 128 * realtile; - //overlap=(int) tilesize*params->wavelet.overl; - overlap = (int) tilesize * 0.125f; - // printf("overl=%d\n",overlap); + int tilesize = 128 * realtile; + int overlap = (int) tilesize * 0.125f; int numtiles_W, numtiles_H, tilewidth, tileheight, tileWskip, tileHskip; if(params->wavelet.Tilesmethod == "full") { @@ -1828,8 +1821,7 @@ void ImProcFunctions::WaveletcontAllL(LabImage * labco, float ** varhue, float * float maxkoeLi[12]; float *koeLibuffer = NULL; - bool lipschitz = false; - lipschitz = true; + bool lipschitz = true; if(lipschitz == true) { for(int y = 0; y < 12; y++) { @@ -3262,8 +3254,6 @@ void ImProcFunctions::ContAllL (float *koeLi[12], float *maxkoeLi, bool lipschit int ii = i / W_L; int jj = i - ii * W_L; float LL100 = labco->L[ii * 2][jj * 2] / 327.68f; - k1 = 600.f; - k2 = 300.f; k1 = 0.3f * (waOpacityCurveW[6.f * LL100] - 0.5f); //k1 between 0 and 0.5 0.5==> 1/6=0.16 k2 = k1 * 2.f; @@ -3525,8 +3515,6 @@ void ImProcFunctions::ContAllAB (LabImage * labco, int maxlvl, float ** varhue, int ii = i / W_ab; int jj = i - ii * W_ab; float LL100 = labco->L[ii * 2][jj * 2] / 327.68f; - k1 = 600.f; - k2 = 300.f; k1 = 0.3f * (waOpacityCurveW[6.f * LL100] - 0.5f); //k1 between 0 and 0.5 0.5==> 1/6=0.16 k2 = k1 * 2.f; diff --git a/rtengine/myfile.cc b/rtengine/myfile.cc index bcc2a7db7..0414cc1de 100644 --- a/rtengine/myfile.cc +++ b/rtengine/myfile.cc @@ -68,18 +68,17 @@ int munmap(void *start, size_t length) IMFILE* fopen (const char* fname) { - int fd = -1; + int fd; #ifdef WIN32 - { - // First convert UTF8 to UTF16, then use Windows function to open the file and convert back to file descriptor. - std::unique_ptr wfname (reinterpret_cast(g_utf8_to_utf16 (fname, -1, NULL, NULL, NULL)), g_free); + fd = -1; + // First convert UTF8 to UTF16, then use Windows function to open the file and convert back to file descriptor. + std::unique_ptr wfname (reinterpret_cast(g_utf8_to_utf16 (fname, -1, NULL, NULL, NULL)), g_free); - HANDLE hFile = CreateFileW (wfname.get (), GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); - if (hFile != INVALID_HANDLE_VALUE) { - fd = _open_osfhandle((intptr_t)hFile, 0); - } + HANDLE hFile = CreateFileW (wfname.get (), GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); + if (hFile != INVALID_HANDLE_VALUE) { + fd = _open_osfhandle((intptr_t)hFile, 0); } #else diff --git a/rtengine/processingjob.h b/rtengine/processingjob.h index 3364e6daf..fbf56234f 100644 --- a/rtengine/processingjob.h +++ b/rtengine/processingjob.h @@ -34,15 +34,11 @@ public: procparams::ProcParams pparams; ProcessingJobImpl (const Glib::ustring& fn, bool iR, const procparams::ProcParams& pp) - : fname(fn), isRaw(iR), initialImage(NULL) - { - pparams = pp; - } + : fname(fn), isRaw(iR), initialImage(NULL), pparams(pp) {} ProcessingJobImpl (InitialImage* iImage, const procparams::ProcParams& pp) - : fname(""), initialImage(iImage) + : fname(""), initialImage(iImage), pparams(pp) { - pparams = pp; iImage->increaseRef(); } diff --git a/rtengine/procparams.cc b/rtengine/procparams.cc index 25d5df212..60a54baf5 100644 --- a/rtengine/procparams.cc +++ b/rtengine/procparams.cc @@ -3388,14 +3388,14 @@ int ProcParams::save (const Glib::ustring &fname, const Glib::ustring &fname2, b // save exif change list if (!pedited || pedited->exif) { - for (ExifPairs::const_iterator i = exif.begin(); i != exif.end(); i++) { + for (ExifPairs::const_iterator i = exif.begin(); i != exif.end(); ++i) { keyFile.set_string ("Exif", i->first, i->second); } } // save iptc change list if (!pedited || pedited->iptc) { - for (IPTCPairs::const_iterator i = iptc.begin(); i != iptc.end(); i++) { + for (IPTCPairs::const_iterator i = iptc.begin(); i != iptc.end(); ++i) { Glib::ArrayHandle values = i->second; keyFile.set_string_list ("IPTC", i->first, values); } @@ -7487,7 +7487,7 @@ int ProcParams::load (const Glib::ustring &fname, ParamsEdited* pedited) for ( std::vector::iterator currLoadedTagValue = currIptc.begin(); currLoadedTagValue != currIptc.end(); - currLoadedTagValue++) { + ++currLoadedTagValue) { iptc[keys[i]].push_back(currLoadedTagValue->data()); } diff --git a/rtengine/rawimage.cc b/rtengine/rawimage.cc index 919b1c7be..8f91f8f4b 100644 --- a/rtengine/rawimage.cc +++ b/rtengine/rawimage.cc @@ -19,7 +19,7 @@ namespace rtengine extern const Settings* settings; -RawImage::RawImage( const Glib::ustring name ) +RawImage::RawImage( const Glib::ustring &name ) : data(NULL) , prefilters(0) , filename(name) diff --git a/rtengine/rawimage.h b/rtengine/rawimage.h index 5b425f7df..86965a612 100644 --- a/rtengine/rawimage.h +++ b/rtengine/rawimage.h @@ -99,7 +99,7 @@ class RawImage: public DCraw { public: - RawImage( const Glib::ustring name ); + RawImage( const Glib::ustring &name ); ~RawImage(); int loadRaw (bool loadData = true, bool closeFile = true, ProgressListener *plistener = 0, double progressRange = 1.0); diff --git a/rtengine/shmap.cc b/rtengine/shmap.cc index ac77da25d..bb8e96c11 100644 --- a/rtengine/shmap.cc +++ b/rtengine/shmap.cc @@ -227,7 +227,7 @@ void SHMap::updateL (float** L, double radius, bool hq, int skip) //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% //experimental dirpyr shmap float thresh = (100.f * radius); //1000; - int levrad = 16; + int levrad; // = 16; levrad = 2; //for retinex - otherwise levrad = 16 // set up range function // calculate size of Lookup table. That's possible because from a value k for all i>=k rangefn[i] will be exp(-10) diff --git a/rtexif/rtexif.cc b/rtexif/rtexif.cc index 1cdc2d89c..dd49ab23d 100644 --- a/rtexif/rtexif.cc +++ b/rtexif/rtexif.cc @@ -336,7 +336,7 @@ bool TagDirectory::CPBDump (const Glib::ustring &commFName, const Glib::ustring return true; } -Glib::ustring TagDirectory::getDumpKey (int tagID, const Glib::ustring tagName) +Glib::ustring TagDirectory::getDumpKey (int tagID, const Glib::ustring &tagName) { Glib::ustring key; @@ -2841,7 +2841,7 @@ int ExifManager::createJPEGMarker (const TagDirectory* root, const rtengine::pro cl = new TagDirectory (NULL, ifdAttribs, INTEL); } - for (rtengine::procparams::ExifPairs::const_iterator i = changeList.begin(); i != changeList.end(); i++) { + for (rtengine::procparams::ExifPairs::const_iterator i = changeList.begin(); i != changeList.end(); ++i) { cl->applyChange (i->first, i->second); } @@ -2927,7 +2927,7 @@ int ExifManager::createTIFFHeader (const TagDirectory* root, const rtengine::pro } // apply list of changes - for (rtengine::procparams::ExifPairs::const_iterator i = changeList.begin(); i != changeList.end(); i++) { + for (rtengine::procparams::ExifPairs::const_iterator i = changeList.begin(); i != changeList.end(); ++i) { cl->applyChange (i->first, i->second); } diff --git a/rtexif/rtexif.h b/rtexif/rtexif.h index a8d7088d2..7777331e9 100644 --- a/rtexif/rtexif.h +++ b/rtexif/rtexif.h @@ -101,7 +101,7 @@ protected: const TagAttrib* attribs; // descriptor table to decode the tags ByteOrder order; // byte order TagDirectory* parent; // parent directory (NULL if root) - static Glib::ustring getDumpKey (int tagID, const Glib::ustring tagName); + static Glib::ustring getDumpKey (int tagID, const Glib::ustring &tagName); public: TagDirectory (); @@ -495,7 +495,7 @@ protected: * Get the lens info (min/man focal, min/max aperture) and compare them to the possible choice */ if (lensInfoArray) { - for ( r = choices.lower_bound( lensID ); r != choices.upper_bound(lensID); r++ ) { + for ( r = choices.lower_bound( lensID ); r != choices.upper_bound(lensID); ++r ) { if( !extractLensInfo( r->second , f1, f2, a1, a2) ) { continue; } @@ -532,7 +532,7 @@ protected: std::ostringstream candidates; double deltaMin = 1000.; - for ( r = choices.lower_bound( lensID ); r != choices.upper_bound(lensID); r++ ) { + for ( r = choices.lower_bound( lensID ); r != choices.upper_bound(lensID); ++r ) { double lensAperture, dif; if( !extractLensInfo( r->second , f1, f2, a1, a2) ) { diff --git a/rtgui/batchqueue.cc b/rtgui/batchqueue.cc index 5d91b6ee9..333ad8d4f 100644 --- a/rtgui/batchqueue.cc +++ b/rtgui/batchqueue.cc @@ -365,7 +365,7 @@ bool BatchQueue::loadBatchQueue () return !fd.empty (); } -Glib::ustring BatchQueue::getTempFilenameForParams( const Glib::ustring filename ) +Glib::ustring BatchQueue::getTempFilenameForParams( const Glib::ustring &filename ) { timeval tv; gettimeofday(&tv, 0); diff --git a/rtgui/batchqueue.h b/rtgui/batchqueue.h index b5a3c2167..3bf3cb228 100644 --- a/rtgui/batchqueue.h +++ b/rtgui/batchqueue.h @@ -63,7 +63,7 @@ protected: BatchQueueListener* listener; Glib::ustring autoCompleteFileName (const Glib::ustring& fileName, const Glib::ustring& format); - Glib::ustring getTempFilenameForParams( const Glib::ustring filename ); + Glib::ustring getTempFilenameForParams( const Glib::ustring &filename ); bool saveBatchQueue (); void notifyListener (bool queueEmptied); diff --git a/rtgui/batchqueueentry.cc b/rtgui/batchqueueentry.cc index 0e8b66136..b8bc45601 100644 --- a/rtgui/batchqueueentry.cc +++ b/rtgui/batchqueueentry.cc @@ -32,11 +32,10 @@ Glib::RefPtr BatchQueueEntry::savedAsIcon; BatchQueueEntry::BatchQueueEntry (rtengine::ProcessingJob* pjob, const rtengine::procparams::ProcParams& pparams, Glib::ustring fname, int prevw, int prevh, Thumbnail* thm) : ThumbBrowserEntryBase(fname), opreview(NULL), origpw(prevw), origph(prevh), opreviewDone(false), - job(pjob), progress(0), outFileName(""), sequence(0), forceFormatOpts(false) + job(pjob), progress(0), outFileName(""), sequence(0), forceFormatOpts(false), params(pparams) { thumbnail = thm; - params = pparams; #if 1 //ndef WIN32 // The BatchQueueEntryIdleHelper tracks if an entry has been deleted while it was sitting waiting for "idle" diff --git a/rtgui/bqentryupdater.cc b/rtgui/bqentryupdater.cc index 040036049..596811c58 100644 --- a/rtgui/bqentryupdater.cc +++ b/rtgui/bqentryupdater.cc @@ -42,7 +42,7 @@ void BatchQueueEntryUpdater::process (guint8* oimg, int ow, int oh, int newh, BQ // look up if an older version is in the queue std::list::iterator i; - for (i = jqueue.begin(); i != jqueue.end(); i++) + for (i = jqueue.begin(); i != jqueue.end(); ++i) if (i->oimg == oimg && i->listener == listener) { i->ow = ow; i->oh = oh; @@ -169,7 +169,7 @@ void BatchQueueEntryUpdater::removeJobs (BQEntryUpdateListener* listener) ready = true; std::list::iterator i; - for (i = jqueue.begin(); i != jqueue.end(); i++) + for (i = jqueue.begin(); i != jqueue.end(); ++i) if (i->listener == listener) { jqueue.erase (i); ready = false; diff --git a/rtgui/coloredbar.cc b/rtgui/coloredbar.cc index 192f791fe..64e60b136 100644 --- a/rtgui/coloredbar.cc +++ b/rtgui/coloredbar.cc @@ -100,7 +100,7 @@ void ColoredBar::draw() break; } - for (std::vector::iterator i = bgGradient.begin(); i != bgGradient.end(); i++) { + for (std::vector::iterator i = bgGradient.begin(); i != bgGradient.end(); ++i) { bggradient->add_color_stop_rgb (i->position, i->r, i->g, i->b); } diff --git a/rtgui/cropwindow.cc b/rtgui/cropwindow.cc index da0e2e00c..6d39e0212 100644 --- a/rtgui/cropwindow.cc +++ b/rtgui/cropwindow.cc @@ -511,7 +511,7 @@ void CropWindow::buttonRelease (int button, int num, int bstate, int x, int y) state = SNormal; - for (std::list::iterator i = listeners.begin(); i != listeners.end(); i++) { + for (std::list::iterator i = listeners.begin(); i != listeners.end(); ++i) { (*i)->cropPositionChanged (this); } @@ -2278,7 +2278,7 @@ void CropWindow::delCropWindowListener (CropWindowListener* l) if (*i == l) { i = listeners.erase (i); } else { - i++; + ++i; } } diff --git a/rtgui/dirbrowser.cc b/rtgui/dirbrowser.cc index 040985e16..d3fc8bf79 100644 --- a/rtgui/dirbrowser.cc +++ b/rtgui/dirbrowser.cc @@ -181,7 +181,7 @@ void DirBrowser::addRoot (char letter) void DirBrowser::updateDirTreeRoot () { - for (Gtk::TreeModel::iterator i = dirTreeModel->children().begin(); i != dirTreeModel->children().end(); i++) { + for (Gtk::TreeModel::iterator i = dirTreeModel->children().begin(); i != dirTreeModel->children().end(); ++i) { updateDirTree (i); } } @@ -192,7 +192,7 @@ void DirBrowser::updateDirTree (const Gtk::TreeModel::iterator& iter) if (dirtree->row_expanded (dirTreeModel->get_path (iter))) { updateDir (iter); - for (Gtk::TreeModel::iterator i = iter->children().begin(); i != iter->children().end(); i++) { + for (Gtk::TreeModel::iterator i = iter->children().begin(); i != iter->children().end(); ++i) { updateDirTree (i); } } @@ -208,7 +208,7 @@ void DirBrowser::updateVolumes () for (int i = 0; i < 32; i++) if (((volumes >> i) & 1) && !((nvolumes >> i) & 1)) { // volume i has been deleted - for (Gtk::TreeModel::iterator iter = dirTreeModel->children().begin(); iter != dirTreeModel->children().end(); iter++) + for (Gtk::TreeModel::iterator iter = dirTreeModel->children().begin(); iter != dirTreeModel->children().end(); ++iter) if (iter->get_value (dtColumns.filename).c_str()[0] - 'A' == i) { dirTreeModel->erase (iter); break; @@ -333,7 +333,7 @@ void DirBrowser::updateDir (const Gtk::TreeModel::iterator& iter) while (change) { change = false; - for (Gtk::TreeModel::iterator it = iter->children().begin(); it != iter->children().end(); it++) + for (Gtk::TreeModel::iterator it = iter->children().begin(); it != iter->children().end(); ++it) if (!Glib::file_test (it->get_value (dtColumns.dirname), Glib::FILE_TEST_EXISTS) || !Glib::file_test (it->get_value (dtColumns.dirname), Glib::FILE_TEST_IS_DIR)) { GThreadLock lock; @@ -350,7 +350,7 @@ void DirBrowser::updateDir (const Gtk::TreeModel::iterator& iter) for (int i = 0; i < subDirs.size(); i++) { bool found = false; - for (Gtk::TreeModel::iterator it = iter->children().begin(); it != iter->children().end() && !found ; it++) { + for (Gtk::TreeModel::iterator it = iter->children().begin(); it != iter->children().end() && !found ; ++it) { found = (it->get_value (dtColumns.filename) == subDirs[i]); } @@ -432,7 +432,7 @@ Gtk::TreePath DirBrowser::expandToDir (const Glib::ustring& absDirPath) } ix++; - i++; + ++i; } count++; diff --git a/rtgui/editwindow.cc b/rtgui/editwindow.cc index 76e351569..605e915af 100644 --- a/rtgui/editwindow.cc +++ b/rtgui/editwindow.cc @@ -227,7 +227,7 @@ bool EditWindow::on_delete_event(GdkEventAny* event) // Check if any editor is still processing, and do NOT quit if so. Otherwise crashes and inconsistent caches bool isProcessing = false; - for ( std::set ::iterator iter = filesEdited.begin(); iter != filesEdited.end() && !isProcessing; iter++ ) { + for ( std::set ::iterator iter = filesEdited.begin(); iter != filesEdited.end() && !isProcessing; ++iter ) { if (epanels[*iter]->getIsProcessing()) { isProcessing = true; } @@ -237,7 +237,7 @@ bool EditWindow::on_delete_event(GdkEventAny* event) return true; } - for ( std::set ::iterator iter = filesEdited.begin(); iter != filesEdited.end(); iter++ ) { + for ( std::set ::iterator iter = filesEdited.begin(); iter != filesEdited.end(); ++iter ) { mainNB->remove_page (*epanels[*iter]); } diff --git a/rtgui/exifpanel.cc b/rtgui/exifpanel.cc index 8c39edc02..c7e47ef57 100644 --- a/rtgui/exifpanel.cc +++ b/rtgui/exifpanel.cc @@ -275,7 +275,7 @@ void ExifPanel::delIt (Gtk::TreeModel::iterator iter) } if (recursiveOp) - for (Gtk::TreeModel::iterator i = iter->children().begin(); i != iter->children().end(); i++) { + for (Gtk::TreeModel::iterator i = iter->children().begin(); i != iter->children().end(); ++i) { delIt (i); } } @@ -306,7 +306,7 @@ void ExifPanel::keepIt (Gtk::TreeModel::iterator iter) } if (recursiveOp) - for (Gtk::TreeModel::iterator i = iter->children().begin(); i != iter->children().end(); i++) { + for (Gtk::TreeModel::iterator i = iter->children().begin(); i != iter->children().end(); ++i) { keepIt (i); } } @@ -472,7 +472,7 @@ void ExifPanel::editTag (Gtk::TreeModel::Children root, Glib::ustring name, Glib // look up first segment of the path Gtk::TreeModel::iterator iter; - for (iter = root.begin(); iter != root.end(); iter++) + for (iter = root.begin(); iter != root.end(); ++iter) if (iter->get_value (exifColumns.field_nopango) == fseg) { break; } @@ -581,7 +581,7 @@ void ExifPanel::updateChangeList (Gtk::TreeModel::Children root, std::string pre Gtk::TreeModel::iterator iter; - for (iter = root.begin(); iter != root.end(); iter++) { + for (iter = root.begin(); iter != root.end(); ++iter) { if (iter->get_value (exifColumns.edited) == true) { changeList[ prefix + iter->get_value (exifColumns.field_nopango) ] = iter->get_value (exifColumns.value_nopango); } else if (iter->get_value (exifColumns.action) == AC_WRITE && iter->get_value (exifColumns.icon) == delicon) { @@ -606,7 +606,7 @@ void ExifPanel::updateChangeList () void ExifPanel::applyChangeList () { - for (rtengine::procparams::ExifPairs::iterator i = changeList.begin(); i != changeList.end(); i++) { + for (rtengine::procparams::ExifPairs::iterator i = changeList.begin(); i != changeList.end(); ++i) { editTag (exifTreeModel->children(), i->first, i->second); } } diff --git a/rtgui/favoritbrowser.cc b/rtgui/favoritbrowser.cc index 8ce4caf8f..658390391 100644 --- a/rtgui/favoritbrowser.cc +++ b/rtgui/favoritbrowser.cc @@ -97,7 +97,7 @@ void FavoritBrowser::addPressed () return; } - iter++; + ++iter; } Glib::RefPtr hfile = Gio::File::create_for_parse_name (lastSelectedDir); diff --git a/rtgui/filebrowser.cc b/rtgui/filebrowser.cc index f8a8f225f..68825c696 100644 --- a/rtgui/filebrowser.cc +++ b/rtgui/filebrowser.cc @@ -623,7 +623,7 @@ void FileBrowser::addEntry_ (FileBrowserEntry* entry) std::vector::iterator i = fd.begin(); while (i != fd.end() && *entry < * ((FileBrowserEntry*)*i)) { - i++; + ++i; } fd.insert (i, entry); @@ -640,7 +640,7 @@ FileBrowserEntry* FileBrowser::delEntry (const Glib::ustring& fname) { MYWRITERLOCK(l, entryRW); - for (std::vector::iterator i = fd.begin(); i != fd.end(); i++) + for (std::vector::iterator i = fd.begin(); i != fd.end(); ++i) if ((*i)->filename == fname) { ThumbBrowserEntryBase* entry = *i; entry->selected = false; diff --git a/rtgui/filterpanel.cc b/rtgui/filterpanel.cc index bc4396aca..5a118d6e1 100644 --- a/rtgui/filterpanel.cc +++ b/rtgui/filterpanel.cc @@ -212,7 +212,7 @@ void FilterPanel::setFilter (ExifFilterSettings& defefs, bool updateLists) expcomp->clear_items(); curefs.expcomp.clear(); - for (std::set::iterator i = defefs.expcomp.begin(); i != defefs.expcomp.end(); i++) { + for (std::set::iterator i = defefs.expcomp.begin(); i != defefs.expcomp.end(); ++i) { expcomp->append_text (*i); curefs.expcomp.insert(*i); } @@ -222,7 +222,7 @@ void FilterPanel::setFilter (ExifFilterSettings& defefs, bool updateLists) lens->clear_items(); curefs.lenses.clear(); - for (std::set::iterator i = defefs.lenses.begin(); i != defefs.lenses.end(); i++) { + for (std::set::iterator i = defefs.lenses.begin(); i != defefs.lenses.end(); ++i) { lens->append_text (*i); curefs.lenses.insert(*i); } @@ -232,7 +232,7 @@ void FilterPanel::setFilter (ExifFilterSettings& defefs, bool updateLists) camera->clear_items(); curefs.cameras.clear(); - for (std::set::iterator i = defefs.cameras.begin(); i != defefs.cameras.end(); i++) { + for (std::set::iterator i = defefs.cameras.begin(); i != defefs.cameras.end(); ++i) { camera->append_text(*i); curefs.cameras.insert(*i); } @@ -242,14 +242,14 @@ void FilterPanel::setFilter (ExifFilterSettings& defefs, bool updateLists) filetype->clear_items(); curefs.filetypes.clear(); - for (std::set::iterator i = defefs.filetypes.begin(); i != defefs.filetypes.end(); i++) { + for (std::set::iterator i = defefs.filetypes.begin(); i != defefs.filetypes.end(); ++i) { filetype->append_text(*i); curefs.filetypes.insert(*i); } ftselection->select_all(); } else { - for( Gtk::TreeModel::Children::iterator iter = expcomp->get_model()->children().begin(); iter != expcomp->get_model()->children().end(); iter++) { + for( Gtk::TreeModel::Children::iterator iter = expcomp->get_model()->children().begin(); iter != expcomp->get_model()->children().end(); ++iter) { Glib::ustring v; iter->get_value(0, v); @@ -260,7 +260,7 @@ void FilterPanel::setFilter (ExifFilterSettings& defefs, bool updateLists) } } - for( Gtk::TreeModel::Children::iterator iter = lens->get_model()->children().begin(); iter != lens->get_model()->children().end(); iter++) { + for( Gtk::TreeModel::Children::iterator iter = lens->get_model()->children().begin(); iter != lens->get_model()->children().end(); ++iter) { Glib::ustring v; iter->get_value(0, v); @@ -271,7 +271,7 @@ void FilterPanel::setFilter (ExifFilterSettings& defefs, bool updateLists) } } - for( Gtk::TreeModel::Children::iterator iter = camera->get_model()->children().begin(); iter != camera->get_model()->children().end(); iter++) { + for( Gtk::TreeModel::Children::iterator iter = camera->get_model()->children().begin(); iter != camera->get_model()->children().end(); ++iter) { Glib::ustring v; iter->get_value(0, v); @@ -282,7 +282,7 @@ void FilterPanel::setFilter (ExifFilterSettings& defefs, bool updateLists) } } - for( Gtk::TreeModel::Children::iterator iter = filetype->get_model()->children().begin(); iter != filetype->get_model()->children().end(); iter++) { + for( Gtk::TreeModel::Children::iterator iter = filetype->get_model()->children().begin(); iter != filetype->get_model()->children().end(); ++iter) { Glib::ustring v; iter->get_value(0, v); diff --git a/rtgui/history.cc b/rtgui/history.cc index 689ea6394..fa1ba372b 100644 --- a/rtgui/history.cc +++ b/rtgui/history.cc @@ -222,7 +222,7 @@ void History::procParamsChanged (ProcParams* params, ProcEvent ev, Glib::ustring // remove all rows after the selection if (iter) { - iter++; + ++iter; while (iter) { iter = historyModel->erase (iter); @@ -356,7 +356,7 @@ void History::redo () Gtk::TreeModel::iterator iter = selection->get_selected(); if (iter) { - iter++; + ++iter; if (iter != historyModel->children().end()) { selection->select (iter); diff --git a/rtgui/imagearea.cc b/rtgui/imagearea.cc index 5383058e3..0b757d8ec 100644 --- a/rtgui/imagearea.cc +++ b/rtgui/imagearea.cc @@ -213,7 +213,7 @@ bool ImageArea::on_expose_event(GdkEventExpose* event) cr->fill (); } - for (std::list::reverse_iterator i = cropWins.rbegin(); i != cropWins.rend(); i++) { + for (std::list::reverse_iterator i = cropWins.rbegin(); i != cropWins.rend(); ++i) { (*i)->expose (cr); } diff --git a/rtgui/iptcpanel.cc b/rtgui/iptcpanel.cc index 301f7fc27..3a9b3e81c 100644 --- a/rtgui/iptcpanel.cc +++ b/rtgui/iptcpanel.cc @@ -402,7 +402,7 @@ void IPTCPanel::addKeyWord () keyword->prepend_text (keyword->get_entry()->get_text()); std::vector items; - for (Gtk::TreeModel::iterator i = keyword->get_model()->children().begin(); i != keyword->get_model()->children().end(); i++) { + for (Gtk::TreeModel::iterator i = keyword->get_model()->children().begin(); i != keyword->get_model()->children().end(); ++i) { Glib::ustring s; i->get_value (0, s); items.push_back (s); @@ -454,7 +454,7 @@ void IPTCPanel::addSuppCategory () suppCategory->prepend_text (suppCategory->get_entry()->get_text()); std::vector items; - for (Gtk::TreeModel::iterator i = suppCategory->get_model()->children().begin(); i != suppCategory->get_model()->children().end(); i++) { + for (Gtk::TreeModel::iterator i = suppCategory->get_model()->children().begin(); i != suppCategory->get_model()->children().end(); ++i) { Glib::ustring s; i->get_value (0, s); items.push_back (s); @@ -557,7 +557,7 @@ void IPTCPanel::applyChangeList () keyword->get_entry()->set_text (""); suppCategory->get_entry()->set_text (""); - for (rtengine::procparams::IPTCPairs::iterator i = changeList.begin(); i != changeList.end(); i++) { + for (rtengine::procparams::IPTCPairs::iterator i = changeList.begin(); i != changeList.end(); ++i) { if (i->first == "Caption" && !i->second.empty()) { captionText->set_text (i->second.at(0)); } else if (i->first == "CaptionWriter" && !i->second.empty()) { diff --git a/rtgui/mycurve.cc b/rtgui/mycurve.cc index 55e566ada..626eef4f1 100644 --- a/rtgui/mycurve.cc +++ b/rtgui/mycurve.cc @@ -21,10 +21,9 @@ #include #include -MyCurve::MyCurve () : pipetteR(-1.f), pipetteG(-1.f), pipetteB(-1.f), pipetteVal(-1.f), listener(NULL) +MyCurve::MyCurve () : pipetteR(-1.f), pipetteG(-1.f), pipetteB(-1.f), pipetteVal(-1.f), listener(NULL), cursor_type( CSArrow) { - cursor_type = CSArrow; graphX = get_allocation().get_width() - RADIUS * 2; graphY = get_allocation().get_height() - RADIUS * 2; prevGraphW = graphW; diff --git a/rtgui/mydiagonalcurve.cc b/rtgui/mydiagonalcurve.cc index 2a70e9b7c..fd57633fb 100644 --- a/rtgui/mydiagonalcurve.cc +++ b/rtgui/mydiagonalcurve.cc @@ -591,8 +591,8 @@ bool MyDiagonalCurve::handleEvents (GdkEvent* event) ity = curve.y.begin(); for (int i = 0; i < closest_point; i++) { - itx++; - ity++; + ++itx; + ++ity; } curve.x.insert (itx, 0); @@ -1111,8 +1111,8 @@ bool MyDiagonalCurve::pipetteButton1Pressed(EditDataProvider *provider, int modi ity = curve.y.begin(); for (int i = 0; i < closest_point; i++) { - itx++; - ity++; + ++itx; + ++ity; } lit_point = closest_point; diff --git a/rtgui/myflatcurve.cc b/rtgui/myflatcurve.cc index 0bc3bd533..4127d1ae8 100644 --- a/rtgui/myflatcurve.cc +++ b/rtgui/myflatcurve.cc @@ -641,10 +641,10 @@ bool MyFlatCurve::handleEvents (GdkEvent* event) itrt = curve.rightTangent.begin(); for (int i = 0; i < closest_point; i++) { - itx++; - ity++; - itlt++; - itrt++; + ++itx; + ++ity; + ++itlt; + ++itrt; } curve.x.insert (itx, 0); @@ -1327,10 +1327,10 @@ bool MyFlatCurve::pipetteButton1Pressed(EditDataProvider *provider, int modifier itrt = curve.rightTangent.begin(); for (int i = 0; i < closest_point; i++) { - itx++; - ity++; - itlt++; - itrt++; + ++itx; + ++ity; + ++itlt; + ++itrt; } curve.x.insert (itx, 0); diff --git a/rtgui/paramsedited.cc b/rtgui/paramsedited.cc index fba2ef059..0422f7403 100644 --- a/rtgui/paramsedited.cc +++ b/rtgui/paramsedited.cc @@ -2765,13 +2765,13 @@ void ParamsEdited::combine (rtengine::procparams::ProcParams& toEdit, const rten // Exif changes are added to the existing ones if (exif) - for (procparams::ExifPairs::const_iterator i = mods.exif.begin(); i != mods.exif.end(); i++) { + for (procparams::ExifPairs::const_iterator i = mods.exif.begin(); i != mods.exif.end(); ++i) { toEdit.exif[i->first] = i->second; } // IPTC changes are added to the existing ones if (iptc) - for (procparams::IPTCPairs::const_iterator i = mods.iptc.begin(); i != mods.iptc.end(); i++) { + for (procparams::IPTCPairs::const_iterator i = mods.iptc.begin(); i != mods.iptc.end(); ++i) { toEdit.iptc[i->first] = i->second; } } diff --git a/rtgui/previewhandler.cc b/rtgui/previewhandler.cc index 9ba62230f..e6ef30bca 100644 --- a/rtgui/previewhandler.cc +++ b/rtgui/previewhandler.cc @@ -239,7 +239,7 @@ Glib::RefPtr PreviewHandler::getRoughImage (int desiredW, int desir void PreviewHandler::previewImageChanged () { - for (std::list::iterator i = listeners.begin(); i != listeners.end(); i++) { + for (std::list::iterator i = listeners.begin(); i != listeners.end(); ++i) { (*i)->previewImageChanged (); } } diff --git a/rtgui/profilestore.cc b/rtgui/profilestore.cc index 482f83188..acbbfba63 100644 --- a/rtgui/profilestore.cc +++ b/rtgui/profilestore.cc @@ -252,7 +252,7 @@ bool ProfileStore::parseDir (Glib::ustring& realPath, Glib::ustring& virtualPath int ProfileStore::findFolderId(const Glib::ustring &path) { - for (std::vector::iterator i = folders.begin(); i != folders.end(); i++) { + for (std::vector::iterator i = folders.begin(); i != folders.end(); ++i) { if (*i == path) { return i - folders.begin(); } diff --git a/rtgui/rtwindow.cc b/rtgui/rtwindow.cc index ba6c0cbd8..e64c64d8e 100644 --- a/rtgui/rtwindow.cc +++ b/rtgui/rtwindow.cc @@ -670,7 +670,7 @@ bool RTWindow::on_delete_event(GdkEventAny* event) Gtk::Widget *w = mainNB->get_nth_page(page); bool optionsWritten = false; - for (std::map::iterator i = epanels.begin(); i != epanels.end(); i++) { + for (std::map::iterator i = epanels.begin(); i != epanels.end(); ++i) { if (i->second == w) { i->second->writeOptions(); optionsWritten = true; diff --git a/rtgui/thresholdselector.cc b/rtgui/thresholdselector.cc index 80a961292..796f958e6 100644 --- a/rtgui/thresholdselector.cc +++ b/rtgui/thresholdselector.cc @@ -272,16 +272,16 @@ bool ThresholdSelector::on_expose_event(GdkEventExpose* event) if (pts.size() >= 4) { std::vector::iterator i = pts.begin(); double x = *i; - i++; + ++i; double y = *i; - i++; + ++i; cr->move_to (hb + hwslider + iw * x + 0.5, (yEnd - yStart)*y + yStart); for (; i < pts.end(); ) { x = *i; - i++; + ++i; y = *i; - i++; + ++i; cr->line_to (hb + hwslider + iw * x + 0.5, (yEnd - yStart)*y + yStart); } } else { diff --git a/rtgui/thumbbrowserbase.cc b/rtgui/thumbbrowserbase.cc index 60f990d6d..ea2bb00dd 100644 --- a/rtgui/thumbbrowserbase.cc +++ b/rtgui/thumbbrowserbase.cc @@ -25,9 +25,8 @@ using namespace std; ThumbBrowserBase::ThumbBrowserBase () - : lastClicked(NULL), previewHeight(options.thumbSize), numOfCols(1), inspector(NULL), isInspectorActive(false) + : lastClicked(NULL), previewHeight(options.thumbSize), numOfCols(1), inspector(NULL), isInspectorActive(false), location(THLOC_FILEBROWSER) { - location = THLOC_FILEBROWSER; inW = -1; inH = -1; diff --git a/rtgui/thumbnail.cc b/rtgui/thumbnail.cc index 673c49efe..5e2c7f28f 100644 --- a/rtgui/thumbnail.cc +++ b/rtgui/thumbnail.cc @@ -903,7 +903,7 @@ Glib::ustring Thumbnail::getCacheFileName (const Glib::ustring& subdir, const Gl return cachemgr->getCacheFileName (subdir, fname, fext, cfs.md5); } -void Thumbnail::setFileName (const Glib::ustring fn) +void Thumbnail::setFileName (const Glib::ustring &fn) { fname = fn; diff --git a/rtgui/thumbnail.h b/rtgui/thumbnail.h index 8656543f0..ca2f898ec 100644 --- a/rtgui/thumbnail.h +++ b/rtgui/thumbnail.h @@ -146,7 +146,7 @@ public: { return fname; } - void setFileName (const Glib::ustring fn); + void setFileName (const Glib::ustring &fn); bool isSupported ();