From 670bb20d25fb2b8b0fe56bc85567cf7ce6fa8d48 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= Date: Thu, 25 Nov 2010 11:05:20 +0000 Subject: [PATCH 1/5] cppcheck: methods can be const --- bridges/source/remote/urp/urp_job.hxx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/bridges/source/remote/urp/urp_job.hxx b/bridges/source/remote/urp/urp_job.hxx index ed31e33c387b..02ef755ecfae 100644 --- a/bridges/source/remote/urp/urp_job.hxx +++ b/bridges/source/remote/urp/urp_job.hxx @@ -117,13 +117,13 @@ public: inline void setBridgePropertyCall() { m_bBridgePropertyCall = sal_True; } - inline sal_Bool isBridgePropertyCall() + inline sal_Bool isBridgePropertyCall() const { return m_bBridgePropertyCall; } - inline sal_Bool isOneway() + inline sal_Bool isOneway() const { return m_bOneway; } - inline void setUnmarshal( Unmarshal *p ) - { m_pUnmarshal = p; } + inline void setUnmarshal( Unmarshal *p ) + { m_pUnmarshal = p; } public: typelib_InterfaceMethodTypeDescription *m_pMethodType; typelib_InterfaceAttributeTypeDescription *m_pAttributeType; @@ -248,7 +248,7 @@ public: m_aEntries[m_nCalls].m_bIgnoreCache = bIgnoreCache; } - inline sal_Bool isFull() + inline sal_Bool isFull() const { return m_nCalls >= m_nMaxMessages; } inline sal_Int8 *getHeap( sal_Int32 nSizeToAlloc ) From 849779db912cc97ef2c247d64aefd2069a3f9b0c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= Date: Thu, 25 Nov 2010 11:17:01 +0000 Subject: [PATCH 2/5] remove empty method --- stoc/source/security/file_policy.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/stoc/source/security/file_policy.cxx b/stoc/source/security/file_policy.cxx index b40fb806d4ae..5755defd7739 100644 --- a/stoc/source/security/file_policy.cxx +++ b/stoc/source/security/file_policy.cxx @@ -199,12 +199,12 @@ class PolicyReader inline void back( sal_Unicode c ) SAL_THROW( () ) { m_back = c; } - inline bool isWhiteSpace( sal_Unicode c ) SAL_THROW( () ) + inline bool isWhiteSpace( sal_Unicode c ) const SAL_THROW( () ) { return (' ' == c || '\t' == c || '\n' == c || '\r' == c); } void skipWhiteSpace() SAL_THROW( (RuntimeException) ); - inline bool isCharToken( sal_Unicode c ) SAL_THROW( () ) + inline bool isCharToken( sal_Unicode c ) const SAL_THROW( () ) { return (';' == c || ',' == c || '{' == c || '}' == c); } public: From 066855a15a9a1d5be4e134391ed19ef2c73d5bbd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= Date: Thu, 25 Nov 2010 11:17:35 +0000 Subject: [PATCH 3/5] remove empty method --- registry/source/regimpl.hxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/registry/source/regimpl.hxx b/registry/source/regimpl.hxx index bbb4a5b2016d..c08721ee84d4 100644 --- a/registry/source/regimpl.hxx +++ b/registry/source/regimpl.hxx @@ -123,7 +123,7 @@ public: ORegKey* getRootKey(); - const store::OStoreFile& getStoreFile() + const store::OStoreFile& getStoreFile() const { return m_file; } const rtl::OUString& getName() const From 0d985fd44bb7794851825a3f14acc3c25758259b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= Date: Thu, 25 Nov 2010 11:22:06 +0000 Subject: [PATCH 4/5] cppcheck: methods can be const --- codemaker/source/cunomaker/cunotype.hxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/codemaker/source/cunomaker/cunotype.hxx b/codemaker/source/cunomaker/cunotype.hxx index 89e1347715f3..8df7a066a0a4 100644 --- a/codemaker/source/cunomaker/cunotype.hxx +++ b/codemaker/source/cunomaker/cunotype.hxx @@ -124,7 +124,7 @@ protected: ::rtl::OString checkRealBaseType(const ::rtl::OString& type, sal_Bool bResolveTypeOnly = sal_False); void dumpCppuGetTypeMemberDecl(FileStream& o, CunoTypeDecl eDeclFlag); - sal_Bool isNestedType() + sal_Bool isNestedType() const { return m_bIsNestedType; }; RegistryKeyNames& getNestedTypeNames() From 0ae3237320d843c1a9933dfe6bb656bcddcf3c92 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= Date: Thu, 25 Nov 2010 11:43:31 +0000 Subject: [PATCH 5/5] cppcheck: methods can be const --- bridges/source/remote/urp/urp_marshal.hxx | 2 +- bridges/source/remote/urp/urp_marshal_decl.hxx | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/bridges/source/remote/urp/urp_marshal.hxx b/bridges/source/remote/urp/urp_marshal.hxx index f66528d74703..60292cd23612 100644 --- a/bridges/source/remote/urp/urp_marshal.hxx +++ b/bridges/source/remote/urp/urp_marshal.hxx @@ -69,7 +69,7 @@ namespace bridges_urp return ( m_pos - m_base ) == 2*sizeof( sal_Int32 ); } - inline sal_Int32 Marshal::getSize() + inline sal_Int32 Marshal::getSize() const { return ((sal_Int32) (m_pos - m_base)); } diff --git a/bridges/source/remote/urp/urp_marshal_decl.hxx b/bridges/source/remote/urp/urp_marshal_decl.hxx index a07f6ea48f5a..639d08e47e5c 100644 --- a/bridges/source/remote/urp/urp_marshal_decl.hxx +++ b/bridges/source/remote/urp/urp_marshal_decl.hxx @@ -87,12 +87,12 @@ namespace bridges_urp // is only valid, after finish has been called. // valid until destructed. - inline sal_Int32 getSize(); + inline sal_Int32 getSize() const; - inline sal_Int32 getPos() + inline sal_Int32 getPos() const { return m_pos - m_base; } - inline sal_Bool isSystemLittleEndian() + inline sal_Bool isSystemLittleEndian() const { return g_bMarshalSystemIsLittleEndian; } private: