Kaydet (Commit) 06bf579a authored tarafından Stephan Bergmann's avatar Stephan Bergmann

BPixel has a default ctor zero'ing its members

...so no need to do that again in the body of the BPixelRaster ctor (which had
needlessly been done ever since the code's introduction with
6f769fb8 "INTEGRATION: CWS aw033").  And
BPixelRaster::reset appears to have otherwise been unused, so can be removed.

Change-Id: Icd8e09bfe225be2c6695d8a137c271dca5a70de7
Reviewed-on: https://gerrit.libreoffice.org/48184Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarStephan Bergmann <sbergman@redhat.com>
üst 8b227f7d
...@@ -42,21 +42,13 @@ namespace basegfx ...@@ -42,21 +42,13 @@ namespace basegfx
std::unique_ptr<BPixel[]> mpContent; std::unique_ptr<BPixel[]> mpContent;
public: public:
// reset
void reset()
{
memset(mpContent.get(), 0, sizeof(BPixel) * mnCount);
}
// constructor/destructor // constructor/destructor
BPixelRaster(sal_uInt32 nWidth, sal_uInt32 nHeight) BPixelRaster(sal_uInt32 nWidth, sal_uInt32 nHeight)
: mnWidth(nWidth), : mnWidth(nWidth),
mnHeight(nHeight), mnHeight(nHeight),
mnCount(nWidth * nHeight), mnCount(nWidth * nHeight),
mpContent(new BPixel[mnCount]) mpContent(new BPixel[mnCount])
{ {}
reset();
}
// coordinate calcs between X/Y and span // coordinate calcs between X/Y and span
sal_uInt32 getIndexFromXY(sal_uInt32 nX, sal_uInt32 nY) const { return (nX + (nY * mnWidth)); } sal_uInt32 getIndexFromXY(sal_uInt32 nX, sal_uInt32 nY) const { return (nX + (nY * mnWidth)); }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment