diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-10-12 14:48:15 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-10-13 07:43:45 +0200 |
commit | 31138ff7729cbf179079a5e635d3a823e2971f08 (patch) | |
tree | 4d05cd7f9aa57e8fb0a52002352a25259345d03f | |
parent | 67bf520af2448e15802a5c0af977f3e1e7edb1bf (diff) |
loplugin:constfields in package..registry
Change-Id: Ie139490f2b008bf294910d002af711f8f41fe76d
Reviewed-on: https://gerrit.libreoffice.org/61727
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r-- | include/registry/refltype.hxx | 10 | ||||
-rw-r--r-- | package/inc/EncryptionData.hxx | 10 | ||||
-rw-r--r-- | package/inc/ZipFile.hxx | 2 | ||||
-rw-r--r-- | package/inc/ZipOutputEntry.hxx | 2 | ||||
-rw-r--r-- | package/source/manifest/ManifestImport.hxx | 4 | ||||
-rw-r--r-- | package/source/xstor/ocompinstream.hxx | 2 | ||||
-rw-r--r-- | package/source/xstor/owriteablestream.cxx | 2 | ||||
-rw-r--r-- | package/source/xstor/owriteablestream.hxx | 4 | ||||
-rw-r--r-- | package/source/xstor/selfterminatefilestream.hxx | 2 | ||||
-rw-r--r-- | package/source/xstor/switchpersistencestream.cxx | 2 | ||||
-rw-r--r-- | package/source/xstor/xstorage.cxx | 6 | ||||
-rw-r--r-- | package/source/xstor/xstorage.hxx | 6 | ||||
-rw-r--r-- | package/source/zipapi/XBufferedThreadedStream.hxx | 2 | ||||
-rw-r--r-- | package/source/zipapi/XUnbufferedStream.hxx | 2 | ||||
-rw-r--r-- | package/source/zippackage/ContentInfo.hxx | 2 | ||||
-rw-r--r-- | postprocess/qa/services.cxx | 4 | ||||
-rw-r--r-- | pyuno/source/module/pyuno_impl.hxx | 4 | ||||
-rw-r--r-- | registry/source/keyimpl.hxx | 2 | ||||
-rw-r--r-- | registry/source/reflread.cxx | 14 | ||||
-rw-r--r-- | registry/source/reflwrit.cxx | 24 | ||||
-rw-r--r-- | registry/tools/options.hxx | 2 |
21 files changed, 54 insertions, 54 deletions
diff --git a/include/registry/refltype.hxx b/include/registry/refltype.hxx index ce8abb3a2c7c..5380a0de46bf 100644 --- a/include/registry/refltype.hxx +++ b/include/registry/refltype.hxx @@ -62,11 +62,11 @@ public: */ struct RTUik { - sal_uInt32 m_Data1; - sal_uInt16 m_Data2; - sal_uInt16 m_Data3; - sal_uInt32 m_Data4; - sal_uInt32 m_Data5; + sal_uInt32 const m_Data1; + sal_uInt16 const m_Data2; + sal_uInt16 const m_Data3; + sal_uInt32 const m_Data4; + sal_uInt32 const m_Data5; }; /// specifies the calling convention for type reader/writer api diff --git a/package/inc/EncryptionData.hxx b/package/inc/EncryptionData.hxx index c7c6ffb3555e..66f8aeb5881a 100644 --- a/package/inc/EncryptionData.hxx +++ b/package/inc/EncryptionData.hxx @@ -46,11 +46,11 @@ class EncryptionData : public BaseEncryptionData { public: css::uno::Sequence < sal_Int8 > m_aKey; - sal_Int32 m_nEncAlg; - sal_Int32 m_nCheckAlg; - sal_Int32 m_nDerivedKeySize; - sal_Int32 m_nStartKeyGenID; - bool m_bTryWrongSHA1; + sal_Int32 const m_nEncAlg; + sal_Int32 const m_nCheckAlg; + sal_Int32 const m_nDerivedKeySize; + sal_Int32 const m_nStartKeyGenID; + bool const m_bTryWrongSHA1; EncryptionData(const BaseEncryptionData& aData, const css::uno::Sequence< sal_Int8 >& aKey, sal_Int32 nEncAlg, sal_Int32 nCheckAlg, sal_Int32 nDerivedKeySize, sal_Int32 nStartKeyGenID, bool const bTryWrongSHA1) : BaseEncryptionData( aData ) diff --git a/package/inc/ZipFile.hxx b/package/inc/ZipFile.hxx index 3dceb036c3bd..58755d4ad2c7 100644 --- a/package/inc/ZipFile.hxx +++ b/package/inc/ZipFile.hxx @@ -62,7 +62,7 @@ class ZipFile css::uno::Reference < css::io::XInputStream > xStream; const css::uno::Reference < css::uno::XComponentContext > m_xContext; - bool bRecoveryMode; + bool const bRecoveryMode; // aMediaType parameter is used only for raw stream header creation css::uno::Reference < css::io::XInputStream > createStreamForZipEntry( diff --git a/package/inc/ZipOutputEntry.hxx b/package/inc/ZipOutputEntry.hxx index d95ffd4969ab..15c94aecc14b 100644 --- a/package/inc/ZipOutputEntry.hxx +++ b/package/inc/ZipOutputEntry.hxx @@ -53,7 +53,7 @@ class ZipOutputEntry ZipEntry *m_pCurrentEntry; sal_Int16 m_nDigested; ZipPackageStream* m_pCurrentStream; - bool m_bEncryptCurrentEntry; + bool const m_bEncryptCurrentEntry; std::atomic<bool> m_bFinished; public: diff --git a/package/source/manifest/ManifestImport.hxx b/package/source/manifest/ManifestImport.hxx index 19d426b14f25..33b0637015d7 100644 --- a/package/source/manifest/ManifestImport.hxx +++ b/package/source/manifest/ManifestImport.hxx @@ -36,8 +36,8 @@ typedef std::unordered_map< OUString, OUString > StringHashMap; struct ManifestScopeEntry { - OUString m_aConvertedName; - StringHashMap m_aNamespaces; + OUString const m_aConvertedName; + StringHashMap const m_aNamespaces; bool m_bValid; ManifestScopeEntry( const OUString& aConvertedName, const StringHashMap& aNamespaces ) diff --git a/package/source/xstor/ocompinstream.hxx b/package/source/xstor/ocompinstream.hxx index c41c2c25f40a..58d433d67bfc 100644 --- a/package/source/xstor/ocompinstream.hxx +++ b/package/source/xstor/ocompinstream.hxx @@ -48,7 +48,7 @@ protected: std::unique_ptr<::comphelper::OInterfaceContainerHelper2> m_pInterfaceContainer; css::uno::Sequence < css::beans::PropertyValue > m_aProperties; bool m_bDisposed; - sal_Int32 m_nStorageType; + sal_Int32 const m_nStorageType; public: OInputCompStream( OWriteStream_Impl& pImpl, diff --git a/package/source/xstor/owriteablestream.cxx b/package/source/xstor/owriteablestream.cxx index beb71e11d3ec..2810f9682302 100644 --- a/package/source/xstor/owriteablestream.cxx +++ b/package/source/xstor/owriteablestream.cxx @@ -66,7 +66,7 @@ struct WSInternalData_Impl rtl::Reference<comphelper::RefCountedMutex> m_xSharedMutex; ::std::unique_ptr< ::cppu::OTypeCollection> m_pTypeCollection; ::cppu::OMultiTypeInterfaceContainerHelper m_aListenersContainer; // list of listeners - sal_Int32 m_nStorageType; + sal_Int32 const m_nStorageType; // the mutex reference MUST NOT be empty WSInternalData_Impl( const rtl::Reference<comphelper::RefCountedMutex>& rMutexRef, sal_Int32 nStorageType ) diff --git a/package/source/xstor/owriteablestream.hxx b/package/source/xstor/owriteablestream.hxx index e3eeaf09d4fd..7d7abf6647c3 100644 --- a/package/source/xstor/owriteablestream.hxx +++ b/package/source/xstor/owriteablestream.hxx @@ -104,7 +104,7 @@ struct OWriteStream_Impl bool m_bHasInsertedStreamOptimization; - sal_Int32 m_nStorageType; + sal_Int32 const m_nStorageType; // Relations info related data, stored in *.rels file in OFOPXML format css::uno::Reference< css::io::XInputStream > m_xOrigRelInfoStream; @@ -248,7 +248,7 @@ protected: bool m_bInitOnDemand; sal_Int64 m_nInitPosition; - bool m_bTransacted; + bool const m_bTransacted; OWriteStream( OWriteStream_Impl* pImpl, bool bTransacted ); OWriteStream( OWriteStream_Impl* pImpl, css::uno::Reference< css::io::XStream > const & xStream, bool bTransacted ); diff --git a/package/source/xstor/selfterminatefilestream.hxx b/package/source/xstor/selfterminatefilestream.hxx index 4aecd337d9eb..b1954e2b2605 100644 --- a/package/source/xstor/selfterminatefilestream.hxx +++ b/package/source/xstor/selfterminatefilestream.hxx @@ -32,7 +32,7 @@ class OSelfTerminateFileStream final : public cppu::WeakImplHelper< css::io::XIn { css::uno::Reference< css::ucb::XSimpleFileAccess3 > m_xFileAccess; - OUString m_aURL; + OUString const m_aURL; css::uno::Reference< css::io::XInputStream > m_xInputStream; css::uno::Reference< css::io::XSeekable > m_xSeekable; diff --git a/package/source/xstor/switchpersistencestream.cxx b/package/source/xstor/switchpersistencestream.cxx index 7eac83cbf708..a62702c593cd 100644 --- a/package/source/xstor/switchpersistencestream.cxx +++ b/package/source/xstor/switchpersistencestream.cxx @@ -28,7 +28,7 @@ using namespace ::com::sun::star; struct SPStreamData_Impl { - bool m_bInStreamBased; + bool const m_bInStreamBased; // the streams below are not visible from outside so there is no need to remember position diff --git a/package/source/xstor/xstorage.cxx b/package/source/xstor/xstorage.cxx index f52fff8c6ea6..ece4cbc9162d 100644 --- a/package/source/xstor/xstorage.cxx +++ b/package/source/xstor/xstorage.cxx @@ -77,9 +77,9 @@ struct StorInternalData_Impl rtl::Reference<comphelper::RefCountedMutex> m_xSharedMutex; ::cppu::OMultiTypeInterfaceContainerHelper m_aListenersContainer; // list of listeners ::std::unique_ptr< ::cppu::OTypeCollection> m_pTypeCollection; - bool m_bIsRoot; - sal_Int32 m_nStorageType; // the mode in which the storage is used - bool m_bReadOnlyWrap; + bool const m_bIsRoot; + sal_Int32 const m_nStorageType; // the mode in which the storage is used + bool const m_bReadOnlyWrap; ::rtl::Reference<OChildDispListener_Impl> m_pSubElDispListener; diff --git a/package/source/xstor/xstorage.hxx b/package/source/xstor/xstorage.hxx index 82cffa69a2fe..8cf9d5ac5cfa 100644 --- a/package/source/xstor/xstorage.hxx +++ b/package/source/xstor/xstorage.hxx @@ -84,7 +84,7 @@ struct SotElement_Impl OUString m_aOriginalName; bool m_bIsRemoved; bool m_bIsInserted; - bool m_bIsStorage; + bool const m_bIsStorage; std::unique_ptr<OStorage_Impl> m_xStorage; std::unique_ptr<OWriteStream_Impl, o3tl::default_delete<OWriteStream_Impl>> m_xStream; @@ -129,7 +129,7 @@ struct OStorage_Impl bool m_bCommited; // sending the streams is coordinated by the root storage of the package - bool m_bIsRoot; // marks this storage as root storages that manages all commits and reverts + bool const m_bIsRoot; // marks this storage as root storages that manages all commits and reverts bool m_bListCreated; /// Count of registered modification listeners @@ -166,7 +166,7 @@ struct OStorage_Impl SwitchablePersistenceStream* m_pSwitchStream; - sal_Int32 m_nStorageType; // the mode in which the storage is used + sal_Int32 const m_nStorageType; // the mode in which the storage is used // the _rels substorage that is handled in a special way in embed::StorageFormats::OFOPXML SotElement_Impl* m_pRelStorElement; diff --git a/package/source/zipapi/XBufferedThreadedStream.hxx b/package/source/zipapi/XBufferedThreadedStream.hxx index 272414c37504..8ad600419f8f 100644 --- a/package/source/zipapi/XBufferedThreadedStream.hxx +++ b/package/source/zipapi/XBufferedThreadedStream.hxx @@ -24,7 +24,7 @@ class XBufferedThreadedStream : public cppu::WeakImplHelper< css::io::XInputStre private: const css::uno::Reference<XInputStream> mxSrcStream; sal_Int64 mnPos; /// position in stream - sal_Int64 mnStreamSize; /// available size of stream + sal_Int64 const mnStreamSize; /// available size of stream Buffer maInUseBuffer; /// Buffer block in use int mnOffset; /// position in maInUseBuffer diff --git a/package/source/zipapi/XUnbufferedStream.hxx b/package/source/zipapi/XUnbufferedStream.hxx index db1b58dfe9a8..afb70cc46ba0 100644 --- a/package/source/zipapi/XUnbufferedStream.hxx +++ b/package/source/zipapi/XUnbufferedStream.hxx @@ -59,7 +59,7 @@ class XUnbufferedStream final : public cppu::WeakImplHelper sal_Int16 mnHeaderToRead; sal_Int64 mnZipCurrent, mnZipEnd, mnZipSize, mnMyCurrent; CRC32 maCRC; - bool mbCheckCRC; + bool const mbCheckCRC; public: XUnbufferedStream( diff --git a/package/source/zippackage/ContentInfo.hxx b/package/source/zippackage/ContentInfo.hxx index a3e34de1434d..9ac0802aeed0 100644 --- a/package/source/zippackage/ContentInfo.hxx +++ b/package/source/zippackage/ContentInfo.hxx @@ -27,7 +27,7 @@ struct ZipContentInfo { css::uno::Reference < css::lang::XUnoTunnel > xTunnel; - bool bFolder; + bool const bFolder; union { ZipPackageFolder *pFolder; diff --git a/postprocess/qa/services.cxx b/postprocess/qa/services.cxx index 232a537c4e7e..321432871ddf 100644 --- a/postprocess/qa/services.cxx +++ b/postprocess/qa/services.cxx @@ -164,8 +164,8 @@ void Test::test() { serviceName(theServiceName), defaultConstructor(theDefaultConstructor) {} - OUString serviceName; - bool defaultConstructor; + OUString const serviceName; + bool const defaultConstructor; }; struct Implementation { Implementation( diff --git a/pyuno/source/module/pyuno_impl.hxx b/pyuno/source/module/pyuno_impl.hxx index 73acabdf4a16..8175888e400a 100644 --- a/pyuno/source/module/pyuno_impl.hxx +++ b/pyuno/source/module/pyuno_impl.hxx @@ -336,8 +336,8 @@ class Adapter : public cppu::WeakImplHelper< css::script::XInvocation, css::lang::XUnoTunnel > { PyRef mWrappedObject; - PyInterpreterState *mInterpreter; // interpreters don't seem to be refcounted ! - css::uno::Sequence< css::uno::Type > mTypes; + PyInterpreterState * const mInterpreter; // interpreters don't seem to be refcounted ! + css::uno::Sequence< css::uno::Type > const mTypes; MethodOutIndexMap m_methodOutIndexMap; private: diff --git a/registry/source/keyimpl.hxx b/registry/source/keyimpl.hxx index 27043d2cc223..d5c6ada33395 100644 --- a/registry/source/keyimpl.hxx +++ b/registry/source/keyimpl.hxx @@ -125,7 +125,7 @@ public: private: sal_uInt32 m_refCount; - OUString m_name; + OUString const m_name; bool m_bDeleted:1; bool m_bModified:1; ORegistry* m_pRegistry; diff --git a/registry/source/reflread.cxx b/registry/source/reflread.cxx index c459bab9a8fb..1b0345145989 100644 --- a/registry/source/reflread.cxx +++ b/registry/source/reflread.cxx @@ -213,7 +213,7 @@ class ConstantPool : public BlopObject { public: - sal_uInt16 m_numOfEntries; + sal_uInt16 const m_numOfEntries; std::unique_ptr<sal_Int32[]> m_pIndex; // index values may be < 0 for cached string constants std::unique_ptr<StringCache> m_pStringCache; @@ -529,9 +529,9 @@ class FieldList : public BlopObject { public: - sal_uInt16 m_numOfEntries; + sal_uInt16 const m_numOfEntries; size_t m_FIELD_ENTRY_SIZE; - ConstantPool* m_pCP; + ConstantPool* const m_pCP; FieldList(const sal_uInt8* buffer, sal_uInt32 len, sal_uInt16 numEntries, ConstantPool* pCP) : BlopObject(buffer, len) @@ -713,9 +713,9 @@ class ReferenceList : public BlopObject { public: - sal_uInt16 m_numOfEntries; + sal_uInt16 const m_numOfEntries; size_t m_REFERENCE_ENTRY_SIZE; - ConstantPool* m_pCP; + ConstantPool* const m_pCP; ReferenceList(const sal_uInt8* buffer, sal_uInt32 len, sal_uInt16 numEntries, ConstantPool* pCP) : BlopObject(buffer, len) @@ -813,10 +813,10 @@ class MethodList : public BlopObject { public: - sal_uInt16 m_numOfEntries; + sal_uInt16 const m_numOfEntries; size_t m_PARAM_ENTRY_SIZE; std::unique_ptr<sal_uInt32[]> m_pIndex; - ConstantPool* m_pCP; + ConstantPool* const m_pCP; MethodList(const sal_uInt8* buffer, sal_uInt32 len, sal_uInt16 numEntries, ConstantPool* pCP) : BlopObject(buffer, len) diff --git a/registry/source/reflwrit.cxx b/registry/source/reflwrit.cxx index 53476430287f..67a5b2552ff5 100644 --- a/registry/source/reflwrit.cxx +++ b/registry/source/reflwrit.cxx @@ -138,8 +138,8 @@ sal_uInt32 writeDouble(sal_uInt8* buffer, double v) double v; struct { - sal_uInt32 b1; - sal_uInt32 b2; + sal_uInt32 b1; + sal_uInt32 b2; } b; } x; @@ -175,7 +175,7 @@ sal_uInt32 writeDouble(sal_uInt8* buffer, double v) struct CPInfo { - CPInfoTag m_tag; + CPInfoTag const m_tag; union { const sal_Char* aUtf8; @@ -619,19 +619,19 @@ class TypeWriter public: sal_uInt32 m_refCount; - typereg_Version m_version; - RTTypeClass m_typeClass; - OString m_typeName; - sal_uInt16 m_nSuperTypes; + typereg_Version const m_version; + RTTypeClass const m_typeClass; + OString const m_typeName; + sal_uInt16 const m_nSuperTypes; std::unique_ptr<OString[]> m_superTypeNames; - OString m_doku; - OString m_fileName; - sal_uInt16 m_fieldCount; + OString const m_doku; + OString const m_fileName; + sal_uInt16 const m_fieldCount; FieldEntry* m_fields; - sal_uInt16 m_methodCount; + sal_uInt16 const m_methodCount; MethodEntry* m_methods; - sal_uInt16 m_referenceCount; + sal_uInt16 const m_referenceCount; ReferenceEntry* m_references; std::unique_ptr<sal_uInt8[]> m_blop; diff --git a/registry/tools/options.hxx b/registry/tools/options.hxx index 7b3bee2ff785..6b6264455037 100644 --- a/registry/tools/options.hxx +++ b/registry/tools/options.hxx @@ -31,7 +31,7 @@ namespace tools { class Options { - std::string m_program; + std::string const m_program; Options (Options const &) = delete; Options & operator= (Options const &) = delete; |