[Libreoffice-commits] core.git: dbaccess/source sot/source svl/source vcl/win

Jochen Nitschke j.nitschke+logerrit at ok.de
Mon Apr 11 08:19:48 UTC 2016


 dbaccess/source/core/api/RowSetCache.hxx |    4 ++--
 sot/source/sdstor/stgcache.hxx           |    8 ++++----
 svl/source/config/cjkoptions.cxx         |    2 +-
 svl/source/config/ctloptions.cxx         |    2 +-
 vcl/win/gdi/winlayout.cxx                |    2 +-
 5 files changed, 9 insertions(+), 9 deletions(-)

New commits:
commit b15ee18a5e81b7c3908fb5343930638cac4918d9
Author: Jochen Nitschke <j.nitschke+logerrit at ok.de>
Date:   Mon Apr 11 09:09:44 2016 +0200

    cppcheck: silence warnings assertWithSideEffect
    
    Mark some class methods as pure.
    warnings look like this:
    > dbaccess/source/core/api/RowSetBase.cxx
    > 593    assertWithSideEffect	398	warning	Assert statement calls
    > a function which may have desired side effects: 'isAfterLast'.
    
    Change-Id: I1b69340c3714be4678b599fa9a8ca933122aa857
    Reviewed-on: https://gerrit.libreoffice.org/23981
    Reviewed-by: Noel Grandin <noelgrandin at gmail.com>
    Tested-by: Noel Grandin <noelgrandin at gmail.com>

diff --git a/dbaccess/source/core/api/RowSetCache.hxx b/dbaccess/source/core/api/RowSetCache.hxx
index 86bb8cc..c623d34 100644
--- a/dbaccess/source/core/api/RowSetCache.hxx
+++ b/dbaccess/source/core/api/RowSetCache.hxx
@@ -174,8 +174,8 @@ namespace dbaccess
 
     // css::sdbc::XResultSet
         bool next(  );
-        bool isBeforeFirst(  ) { return m_bBeforeFirst;}
-        bool isAfterLast(  ) { return m_bAfterLast;}
+        bool isBeforeFirst(  ) const { return m_bBeforeFirst;}
+        bool isAfterLast(  ) const { return m_bAfterLast;}
         bool isFirst(  );
         bool isLast(  );
         bool beforeFirst(  );
diff --git a/sot/source/sdstor/stgcache.hxx b/sot/source/sdstor/stgcache.hxx
index 3c0d866..d0ac5c8 100644
--- a/sot/source/sdstor/stgcache.hxx
+++ b/sot/source/sdstor/stgcache.hxx
@@ -66,13 +66,13 @@ public:
     void  IncRef()                          { m_nRef++;           }
     sal_uInt16 DecRef()                     { return --m_nRef;    }
     void  SetPhysPageSize( short );
-    sal_Int32 GetPhysPages()                { return m_nPages;    }
-    short GetPhysPageSize()                 { return m_nPageSize; }
+    sal_Int32 GetPhysPages() const          { return m_nPages;    }
+    short GetPhysPageSize() const           { return m_nPageSize; }
     SvStream* GetStrm()                     { return m_pStrm;     }
     void  SetStrm( SvStream*, bool );
     void  SetStrm( UCBStorageStream* );
-    bool  IsWritable()                      { return ( m_pStrm && m_pStrm->IsWritable() ); }
-    bool  Good()                            { return m_nError == SVSTREAM_OK; }
+    bool  IsWritable() const                { return ( m_pStrm && m_pStrm->IsWritable() ); }
+    bool  Good() const                      { return m_nError == SVSTREAM_OK; }
     ErrCode GetError()                      { return m_nError;    }
     void  MoveError( StorageBase& );
     void  SetError( ErrCode );
diff --git a/svl/source/config/cjkoptions.cxx b/svl/source/config/cjkoptions.cxx
index a9b7786..9062501 100644
--- a/svl/source/config/cjkoptions.cxx
+++ b/svl/source/config/cjkoptions.cxx
@@ -66,7 +66,7 @@ public:
     virtual void    Notify( const css::uno::Sequence< OUString >& rPropertyNames ) override;
     void            Load();
 
-    bool IsLoaded()                         { return bIsLoaded;         }
+    bool IsLoaded() const                   { return bIsLoaded;         }
 
     bool IsCJKFontEnabled() const           { return bCJKFont;          }
     bool IsVerticalTextEnabled() const      { return bVerticalText;     }
diff --git a/svl/source/config/ctloptions.cxx b/svl/source/config/ctloptions.cxx
index e431ecf..7aed551 100644
--- a/svl/source/config/ctloptions.cxx
+++ b/svl/source/config/ctloptions.cxx
@@ -63,7 +63,7 @@ public:
     virtual void    Notify( const Sequence< OUString >& _aPropertyNames ) override;
     void            Load();
 
-    bool            IsLoaded() { return m_bIsLoaded; }
+    bool            IsLoaded() const { return m_bIsLoaded; }
     void            SetCTLFontEnabled( bool _bEnabled );
     bool            IsCTLFontEnabled() const { return m_bCTLFontEnabled; }
 
diff --git a/vcl/win/gdi/winlayout.cxx b/vcl/win/gdi/winlayout.cxx
index f370ff5..eb4e15e 100644
--- a/vcl/win/gdi/winlayout.cxx
+++ b/vcl/win/gdi/winlayout.cxx
@@ -124,7 +124,7 @@ public:
         return maOpenGLTextureCache[nGlyphIndex];
     }
 
-    bool IsGlyphCached(int nGlyphIndex)
+    bool IsGlyphCached(int nGlyphIndex) const
     {
         return maOpenGLTextureCache.find(nGlyphIndex) != maOpenGLTextureCache.end();
     }


More information about the Libreoffice-commits mailing list