diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-09-06 09:31:55 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-09-06 11:58:09 +0200 |
commit | 0d56337387dd08315410d62efd525c552569d60a (patch) | |
tree | 0972f18546eb6d41f14304bb6063cf09add019df | |
parent | 0219788cb57e51820d0c5ea99d570efd735cfb72 (diff) |
clang-tidy:clang-analyzer-optin.performance.Padding
noting that XMLTokenEnum was already being treated as being limited to
32-bits, we bitmask it together with namespaces
Change-Id: Ic48f2a662452d1b8e022078d31a723d2ac65aef0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121707
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r-- | basic/source/runtime/stdobj.cxx | 6 | ||||
-rw-r--r-- | i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx | 8 | ||||
-rw-r--r-- | include/xmloff/xmltoken.hxx | 2 | ||||
-rw-r--r-- | sot/inc/sysformats.hxx | 6 | ||||
-rw-r--r-- | xmloff/source/forms/property_description.hxx | 6 |
5 files changed, 15 insertions, 13 deletions
diff --git a/basic/source/runtime/stdobj.cxx b/basic/source/runtime/stdobj.cxx index 40fd9c25b799..1a2499cde2da 100644 --- a/basic/source/runtime/stdobj.cxx +++ b/basic/source/runtime/stdobj.cxx @@ -58,16 +58,16 @@ namespace { struct Method { + RtlCall pFunc; std::u16string_view sName; SbxDataType eType; short nArgs; - RtlCall pFunc; sal_uInt16 nHash; constexpr Method(std::u16string_view name, SbxDataType type, short args, RtlCall func) - : sName(name) + : pFunc(func) + , sName(name) , eType(type) , nArgs(args) - , pFunc(func) , nHash(SbxVariable::MakeHashCode(name)) { } diff --git a/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx b/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx index a5a604903ad6..e5d631e3e1e5 100644 --- a/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx +++ b/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx @@ -1028,9 +1028,11 @@ DefaultNumberingProvider::makeNumberingString( const Sequence<beans::PropertyVal struct Supported_NumberingType { - sal_Int16 nType; - const char* cSymbol; - sal_Int16 langOption; + const char* cSymbol; + sal_Int16 nType; + sal_Int16 langOption; + Supported_NumberingType(sal_Int16 nType_, const char* pSymbol, sal_Int16 opt) + : cSymbol(pSymbol), nType(nType_), langOption(opt) {} }; const Supported_NumberingType aSupportedTypes[] = { diff --git a/include/xmloff/xmltoken.hxx b/include/xmloff/xmltoken.hxx index d30f0781b950..e4b2314527f0 100644 --- a/include/xmloff/xmltoken.hxx +++ b/include/xmloff/xmltoken.hxx @@ -46,7 +46,7 @@ namespace xmloff::token { /** * The enumeration of all XML tokens. */ - enum XMLTokenEnum + enum XMLTokenEnum : sal_Int16 { XML_TOKEN_START = 0, XML_TOKEN_INVALID = XML_TOKEN_START, diff --git a/sot/inc/sysformats.hxx b/sot/inc/sysformats.hxx index 7bca96ef425c..f3a399f4133a 100644 --- a/sot/inc/sysformats.hxx +++ b/sot/inc/sysformats.hxx @@ -31,14 +31,14 @@ struct SotAction_Impl { SotClipboardFormatId nFormatId; // Clipboard Id - sal_uInt16 nAction; // Action Id SotExchangeActionFlags nFlags; // Action Id + sal_uInt16 nAction; // Action Id sal_uInt8 nContextCheckId; // additional check of content in clipboard constexpr SotAction_Impl(SotClipboardFormatId _nFormatId, sal_uInt16 _nAction, SotExchangeActionFlags _nFlags, sal_uInt8 _nContextCheckId) - : nFormatId(_nFormatId), nAction(_nAction), nFlags(_nFlags), nContextCheckId(_nContextCheckId) {} + : nFormatId(_nFormatId), nFlags(_nFlags), nAction(_nAction), nContextCheckId(_nContextCheckId) {} constexpr SotAction_Impl(SotClipboardFormatId _nFormatId, sal_uInt16 _nAction) - : nFormatId(_nFormatId), nAction(_nAction), nFlags(SotExchangeActionFlags::NONE), nContextCheckId(0) {} + : nFormatId(_nFormatId), nFlags(SotExchangeActionFlags::NONE), nAction(_nAction), nContextCheckId(0) {} }; namespace sot diff --git a/xmloff/source/forms/property_description.hxx b/xmloff/source/forms/property_description.hxx index 53adb3bf93b2..d30afcd299d2 100644 --- a/xmloff/source/forms/property_description.hxx +++ b/xmloff/source/forms/property_description.hxx @@ -63,17 +63,17 @@ namespace xmloff /** denotes the attribute which represents the property. Note that multiple properties might comprise a single attribute value. */ - const AttributeDescription attribute; /// is the factory for creating a handler for reading and writing the property const PropertyHandlerFactory factory; /// the unique ID of the property. The property meta data table must not contain two entries with the same property ID const PropertyId propertyId; + const AttributeDescription attribute; PropertyDescription() :propertyName() - ,attribute() ,factory( nullptr ) ,propertyId( PID_INVALID ) + ,attribute() { } @@ -85,9 +85,9 @@ namespace xmloff const PropertyId i_propertyId ) :propertyName( i_propertyName ) - ,attribute( i_namespacePrefix, i_attributeToken ) ,factory( i_factory ) ,propertyId( i_propertyId ) + ,attribute( i_namespacePrefix, i_attributeToken ) { } }; |