Cppcheck: Fixed bug from last commit. Also added some new fixes

This commit is contained in:
heckflosse
2016-10-13 17:37:08 +02:00
parent 172ab63b85
commit 3625643392
13 changed files with 44 additions and 448 deletions

View File

@@ -54,10 +54,6 @@ template<class T> T** allocArray (int W, int H)
StdImageSource::StdImageSource () : ImageSource(), img(NULL), plistener(NULL), full(false), max{}, rgbSourceModified(false)
{
hrmap[0] = NULL;
hrmap[1] = NULL;
hrmap[2] = NULL;
needhr = NULL;
embProfile = NULL;
idata = NULL;
}
@@ -67,17 +63,6 @@ StdImageSource::~StdImageSource ()
delete idata;
if (hrmap[0] != NULL) {
int dh = img->getH() / HR_SCALE;
freeArray<float>(hrmap[0], dh);
freeArray<float>(hrmap[1], dh);
freeArray<float>(hrmap[2], dh);
}
if (needhr) {
freeArray<char>(needhr, img->getH());
}
if (img) {
delete img;
}
@@ -311,7 +296,7 @@ void StdImageSource::getFullSize (int& w, int& h, int tr)
}
}
void StdImageSource::getSize (int tran, PreviewProps pp, int& w, int& h)
void StdImageSource::getSize (PreviewProps pp, int& w, int& h)
{
w = pp.w / pp.skip + (pp.w % pp.skip > 0);