[Libreoffice-commits] core.git: 2 commits - include/svtools svtools/source vcl/source

Caolán McNamara caolanm at redhat.com
Fri Jan 13 14:23:14 UTC 2017


 include/svtools/grfmgr.hxx         |    1 -
 svtools/source/graphic/grfattr.cxx |    7 -------
 vcl/source/filter/ixpm/xpmread.cxx |    5 +++--
 3 files changed, 3 insertions(+), 10 deletions(-)

New commits:
commit 15cee52b62c760e1cb212d34d9279c5eee5ecb6d
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Jan 13 14:22:30 2017 +0000

    use the same number in alloc and memset
    
    Change-Id: Ie532985e655d1dd383a1781422213cee0787bfae

diff --git a/vcl/source/filter/ixpm/xpmread.cxx b/vcl/source/filter/ixpm/xpmread.cxx
index d9d237d..57dd2b3 100644
--- a/vcl/source/filter/ixpm/xpmread.cxx
+++ b/vcl/source/filter/ixpm/xpmread.cxx
@@ -216,8 +216,9 @@ ReadState XPMReader::ReadXPM( Graphic& rGraphic )
                             // using 2 charakters per pixel and less than 257 Colors we speed up
                             if ( mnCpp == 2 )   // by using a 64kb indexing table
                             {
-                                mpFastColorTable = new sal_uInt8[ 256 * 256 ];
-                                memset(mpFastColorTable, 0, 255 * 255);
+                                const size_t nSize = 256 * 256;
+                                mpFastColorTable = new sal_uInt8[nSize];
+                                memset(mpFastColorTable, 0, nSize);
                                 for ( pPtr = mpColMap, i = 0; i < mnColors; i++, pPtr += mnCpp + 4 )
                                 {
                                     sal_uLong   j =  pPtr[ 0 ] << 8;
commit 467e32348faf71ed1aa4039910e7a6ba6dd2eb8c
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Jan 13 13:48:49 2017 +0000

    coverity#1371198 Missing move assignment operator
    
    Change-Id: I89a718a245ea36f33c47f8044280bf7e46c0f66a

diff --git a/include/svtools/grfmgr.hxx b/include/svtools/grfmgr.hxx
index abd8b29..18af820 100644
--- a/include/svtools/grfmgr.hxx
+++ b/include/svtools/grfmgr.hxx
@@ -102,7 +102,6 @@ private:
 public:
 
                     GraphicAttr();
-                    ~GraphicAttr();
 
     bool            operator==( const GraphicAttr& rAttr ) const;
     bool            operator!=( const GraphicAttr& rAttr ) const { return !( *this == rAttr ); }
diff --git a/svtools/source/graphic/grfattr.cxx b/svtools/source/graphic/grfattr.cxx
index 03d4908..6b5cd6c 100644
--- a/svtools/source/graphic/grfattr.cxx
+++ b/svtools/source/graphic/grfattr.cxx
@@ -41,12 +41,6 @@ GraphicAttr::GraphicAttr() :
 {
 }
 
-
-GraphicAttr::~GraphicAttr()
-{
-}
-
-
 bool GraphicAttr::operator==( const GraphicAttr& rAttr ) const
 {
     return( ( mfGamma == rAttr.mfGamma ) &&
@@ -66,5 +60,4 @@ bool GraphicAttr::operator==( const GraphicAttr& rAttr ) const
             ( meDrawMode == rAttr.meDrawMode ) );
 }
 
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */


More information about the Libreoffice-commits mailing list