qimagescale: Get rid of the memset call
There is no need to call a memset as long as class is initialized with new and default-constructor will initialize values. Change-Id: I02f9ec524e32cb72713f6b5e37b60f3dec72fb28 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
This commit is contained in:
parent
1a6a78171a
commit
07f79a8029
@ -239,7 +239,6 @@ static QImageScaleInfo* QImageScale::qimageCalcScaleInfo(const QImage &img,
|
|||||||
isi = new QImageScaleInfo;
|
isi = new QImageScaleInfo;
|
||||||
if (!isi)
|
if (!isi)
|
||||||
return 0;
|
return 0;
|
||||||
memset(isi, 0, sizeof(QImageScaleInfo));
|
|
||||||
|
|
||||||
isi->xup_yup = (qAbs(dw) >= sw) + ((qAbs(dh) >= sh) << 1);
|
isi->xup_yup = (qAbs(dw) >= sw) + ((qAbs(dh) >= sh) << 1);
|
||||||
|
|
||||||
|
@ -61,10 +61,11 @@ QImage qSmoothScaleImage(const QImage &img, int w, int h);
|
|||||||
|
|
||||||
namespace QImageScale {
|
namespace QImageScale {
|
||||||
struct QImageScaleInfo {
|
struct QImageScaleInfo {
|
||||||
int *xpoints;
|
int *xpoints{nullptr};
|
||||||
const unsigned int **ypoints;
|
const unsigned int **ypoints{nullptr};
|
||||||
int *xapoints, *yapoints;
|
int *xapoints{nullptr};
|
||||||
int xup_yup;
|
int *yapoints{nullptr};
|
||||||
|
int xup_yup{0};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user