From b15ee18a5e81b7c3908fb5343930638cac4918d9 Mon Sep 17 00:00:00 2001 From: Jochen Nitschke Date: Mon, 11 Apr 2016 09:09:44 +0200 Subject: 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 Tested-by: Noel Grandin --- sot/source/sdstor/stgcache.hxx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'sot') diff --git a/sot/source/sdstor/stgcache.hxx b/sot/source/sdstor/stgcache.hxx index 3c0d866524a0..d0ac5c89494e 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 ); -- cgit