diff options
author | Noel Grandin <noel@peralex.com> | 2015-01-20 12:38:10 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-01-26 08:42:28 +0200 |
commit | b44cbb26efe1d0b0950b1e1613e131b506dc3876 (patch) | |
tree | 9b4d5d99e5dad0971079b997a02a6d96536709ca /include/tools | |
parent | 26ad60aec69310fecd918f1c2e09056aa4782320 (diff) |
new loplugin: change virtual methods to non-virtual
Where we can prove that the virtual method is never overriden.
In the case of pure-virtual methods, we remove the method entirely.
Sometimes this leads to entire methods and fields being
eliminated.
Change-Id: I138ef81c95f115dbd8c023a83cfc7e9d5d6d14ae
Diffstat (limited to 'include/tools')
-rw-r--r-- | include/tools/inetmime.hxx | 6 | ||||
-rw-r--r-- | include/tools/inetmsg.hxx | 2 | ||||
-rw-r--r-- | include/tools/stream.hxx | 14 |
3 files changed, 11 insertions, 11 deletions
diff --git a/include/tools/inetmime.hxx b/include/tools/inetmime.hxx index 0e0269a9dacf..2e1911f86e57 100644 --- a/include/tools/inetmime.hxx +++ b/include/tools/inetmime.hxx @@ -714,7 +714,7 @@ protected: @return The length of pOctets (without the terminating null). */ - virtual sal_Size writeSequence(const sal_Char * pSequence); + sal_Size writeSequence(const sal_Char * pSequence); /** Write a sequence of octets. @@ -726,7 +726,7 @@ protected: @param pEnd Points past the end of the sequence, must be >= pBegin. */ - virtual void writeSequence(const sal_uInt32 * pBegin, + void writeSequence(const sal_uInt32 * pBegin, const sal_uInt32 * pEnd); /** Write a sequence of octets. @@ -739,7 +739,7 @@ protected: @param pEnd Points past the end of the sequence, must be >= pBegin. */ - virtual void writeSequence(const sal_Unicode * pBegin, + void writeSequence(const sal_Unicode * pBegin, const sal_Unicode * pEnd); public: diff --git a/include/tools/inetmsg.hxx b/include/tools/inetmsg.hxx index 062f1bbe926a..912595cab622 100644 --- a/include/tools/inetmsg.hxx +++ b/include/tools/inetmsg.hxx @@ -423,7 +423,7 @@ public: bool HeaderParsed() const { return bHeaderParsed; } - virtual INetMIMEMessage* CreateMessage ( + INetMIMEMessage* CreateMessage ( const INetMIMEMessage& rMsg) const; using INetRFC822Message::SetHeaderField; diff --git a/include/tools/stream.hxx b/include/tools/stream.hxx index 59561de1d9c2..27854e05c051 100644 --- a/include/tools/stream.hxx +++ b/include/tools/stream.hxx @@ -127,10 +127,10 @@ public: virtual ~SvLockBytes() { close(); } - virtual const SvStream * GetStream() const { return m_pStream; } + const SvStream * GetStream() const { return m_pStream; } virtual void SetSynchronMode(bool bTheSync = true) { m_bSync = bTheSync; } - virtual bool IsSynchronMode() const { return m_bSync; } + bool IsSynchronMode() const { return m_bSync; } virtual ErrCode ReadAt(sal_uInt64 nPos, void * pBuffer, sal_Size nCount, sal_Size * pRead) const; @@ -462,10 +462,10 @@ public: friend SvStream& operator<<( SvStream& rStr, SvStrPtr f ); // for Manips /// end of input seen during previous i/o operation - virtual bool eof() const { return bIsEof; } + bool eof() const { return bIsEof; } /// stream is broken - virtual bool bad() const { return GetError() != 0; } + bool bad() const { return GetError() != 0; } /** Get state @@ -698,7 +698,7 @@ protected: /// AllocateMemory must update pBuf accordingly /// - pBuf: Address of new block - virtual bool AllocateMemory( sal_Size nSize ); + bool AllocateMemory( sal_Size nSize ); /// ReAllocateMemory must update the following variables: /// - pBuf: Address of new block @@ -706,11 +706,11 @@ protected: /// Set to 0 , if new block size is 0 bytes /// - nSize: New block size /// - nPos: Set to 0 if position outside of block - virtual bool ReAllocateMemory( long nDiff ); + bool ReAllocateMemory( long nDiff ); /// Is called when this stream allocated the buffer or the buffer is /// resized. FreeMemory may need to NULLify handles in derived classes. - virtual void FreeMemory(); + void FreeMemory(); SvMemoryStream(void*) { } // for sub-classes |