diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-05-28 13:18:41 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-05-29 09:40:12 +0200 |
commit | 31b0be0f21479323408e128f2e8a1a795e037e74 (patch) | |
tree | 97f4d31113dc06084758042cd6e87f73c5c5a43e /include/comphelper | |
parent | f1ce5c3e7e621334be29df0fa425803ce77afb28 (diff) |
improve pahole script and pack a few classes
(*) fix: I was substracting the padding space instead of adding it
when calculating how much free space we had to improve.
(*) sort input data, so we process structs located in the same DSO
together, which reduces GDB's memory usage
(*) handle another error condition, where gdbs output is sufficiently
mixed up that we miss the end of commands terminator
Change-Id: Ic4bb92b736f38a2b3d90e4a14485152b7f869b43
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95041
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'include/comphelper')
-rw-r--r-- | include/comphelper/PropertyInfoHash.hxx | 17 | ||||
-rw-r--r-- | include/comphelper/enumhelper.hxx | 4 | ||||
-rw-r--r-- | include/comphelper/interfacecontainer2.hxx | 2 | ||||
-rw-r--r-- | include/comphelper/propertysetinfo.hxx | 4 |
4 files changed, 16 insertions, 11 deletions
diff --git a/include/comphelper/PropertyInfoHash.hxx b/include/comphelper/PropertyInfoHash.hxx index 03c4373001d2..8c584ce5a572 100644 --- a/include/comphelper/PropertyInfoHash.hxx +++ b/include/comphelper/PropertyInfoHash.hxx @@ -28,15 +28,20 @@ namespace comphelper { struct PropertyInfo { - OUString const maName; - sal_Int32 const mnHandle; - css::uno::Type const maType; - sal_Int16 const mnAttributes; + OUString maName; + css::uno::Type maType; + sal_Int32 mnHandle; + sal_Int16 mnAttributes; + + PropertyInfo(OUString const & aName, sal_Int32 nHandle, css::uno::Type const & aType, sal_Int16 nAttributes) + : maName(aName), maType(aType), mnHandle(nHandle), mnAttributes(nAttributes) {} + PropertyInfo(OUString && aName, sal_Int32 nHandle, css::uno::Type const & aType, sal_Int16 nAttributes) + : maName(std::move(aName)), maType(aType), mnHandle(nHandle), mnAttributes(nAttributes) {} }; struct PropertyData { - sal_uInt8 const mnMapId; - PropertyInfo const *mpInfo; + sal_uInt8 mnMapId; + const PropertyInfo *mpInfo; PropertyData ( sal_uInt8 nMapId, PropertyInfo const *pInfo ) : mnMapId ( nMapId ) , mpInfo ( pInfo ) {} diff --git a/include/comphelper/enumhelper.hxx b/include/comphelper/enumhelper.hxx index 16d95b76e808..5e5e000d78df 100644 --- a/include/comphelper/enumhelper.hxx +++ b/include/comphelper/enumhelper.hxx @@ -46,9 +46,9 @@ class COMPHELPER_DLLPUBLIC OEnumerationByName final : private OEnumerationLock css::lang::XEventListener > { css::uno::Sequence< OUString > const m_aNames; + css::uno::Reference< css::container::XNameAccess > m_xAccess; sal_Int32 m_nPos; - css::uno::Reference< css::container::XNameAccess > m_xAccess; - bool m_bListening; + bool m_bListening; public: OEnumerationByName(const css::uno::Reference< css::container::XNameAccess >& _rxAccess); diff --git a/include/comphelper/interfacecontainer2.hxx b/include/comphelper/interfacecontainer2.hxx index c049a6c6726e..626ef830211d 100644 --- a/include/comphelper/interfacecontainer2.hxx +++ b/include/comphelper/interfacecontainer2.hxx @@ -100,9 +100,9 @@ public: private: OInterfaceContainerHelper2 & rCont; - bool const bIsList; detail::element_alias2 aData; sal_Int32 nRemain; + bool bIsList; OInterfaceIteratorHelper2( const OInterfaceIteratorHelper2 & ) = delete; OInterfaceIteratorHelper2 & operator = ( const OInterfaceIteratorHelper2 & ) = delete; diff --git a/include/comphelper/propertysetinfo.hxx b/include/comphelper/propertysetinfo.hxx index ee413ac51611..aaf8484ad879 100644 --- a/include/comphelper/propertysetinfo.hxx +++ b/include/comphelper/propertysetinfo.hxx @@ -44,8 +44,8 @@ namespace comphelper struct PropertyMapEntry { OUString maName; - sal_Int32 mnHandle; css::uno::Type maType; + sal_Int32 mnHandle; /// flag bitmap, @see css::beans::PropertyAttribute sal_Int16 mnAttributes; sal_uInt8 mnMemberId; @@ -54,8 +54,8 @@ struct PropertyMapEntry PropertyMapEntry(OUString _aName, sal_Int32 _nHandle, css::uno::Type const & _rType, sal_Int16 _nAttributes, sal_uInt8 _nMemberId, PropertyMoreFlags _nMoreFlags = PropertyMoreFlags::NONE) : maName( _aName ) - , mnHandle( _nHandle ) , maType( _rType ) + , mnHandle( _nHandle ) , mnAttributes( _nAttributes ) , mnMemberId( _nMemberId ) , mnMoreFlags( _nMoreFlags ) |