diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-09-13 15:00:56 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-09-17 10:52:39 +0200 |
commit | 05db125c57ea3c8f04a304561209c32cc5c45a67 (patch) | |
tree | b145bc06aefb426e9b92fe9b4defea02a5ee4abe /vcl/unx/generic/print | |
parent | be9b83445ec19346a4d5c830c955ed573469591a (diff) |
loplugin:staticconstfield improvements
Change-Id: Ia0a19736dfd4500bb17b04c072710f8ee8744031
Reviewed-on: https://gerrit.libreoffice.org/60526
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vcl/unx/generic/print')
-rw-r--r-- | vcl/unx/generic/print/bitmap_gfx.cxx | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/vcl/unx/generic/print/bitmap_gfx.cxx b/vcl/unx/generic/print/bitmap_gfx.cxx index b34bdfd511d9..04ce1fd3ba96 100644 --- a/vcl/unx/generic/print/bitmap_gfx.cxx +++ b/vcl/unx/generic/print/bitmap_gfx.cxx @@ -277,7 +277,7 @@ private: std::array<LZWCTreeNode, 4096> mpTable; // LZW compression data LZWCTreeNode* mpPrefix; // the compression is as same as the TIFF compression - sal_uInt16 const mnDataSize; + static constexpr sal_uInt16 gnDataSize = 8; sal_uInt16 const mnClearCode; sal_uInt16 const mnEOICode; sal_uInt16 mnTableSize; @@ -298,11 +298,10 @@ public: LZWEncoder::LZWEncoder(osl::File* pOutputFile) : Ascii85Encoder (pOutputFile), mpPrefix(nullptr), - mnDataSize(8), - mnClearCode(1 << mnDataSize), + mnClearCode(1 << gnDataSize), mnEOICode(mnClearCode + 1), mnTableSize(mnEOICode + 1), - mnCodeSize(mnDataSize + 1), + mnCodeSize(gnDataSize + 1), mnOffset(32), // free bits in dwShift mdwShift(0) { @@ -375,7 +374,7 @@ LZWEncoder::EncodeByte (sal_uInt8 nByte ) for (i = 0; i < mnClearCode; i++) mpTable[i].mpFirstChild = nullptr; - mnCodeSize = mnDataSize + 1; + mnCodeSize = gnDataSize + 1; mnTableSize = mnEOICode + 1; } else |