summaryrefslogtreecommitdiff
path: root/xmloff
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2021-09-11 15:51:05 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-09-11 17:23:48 +0200
commit580b314a797917def3ce0f52abc02700a2768120 (patch)
treed70dced797a6ffaf4e6f0eaba411f14b447779c0 /xmloff
parentd8910519f1bc5aa284a79b7d24581d087adf0c29 (diff)
clang:optin.performance.Padding in xmloff
Excessive padding in 'struct (anonymous namespace)::ConnectionHint' (11 padding bytes, where 3 is optimal). Excessive padding in 'struct (anonymous namespace)::XMLEffectHint' (12 padding bytes, where 4 is optimal). Excessive padding in 'struct xmloff::token::(anonymous namespace)::XMLTokenEntry' (10 padding bytes, where 2 is optimal). Change-Id: I176378d7cd6aa441856fce1b20c3af78bd5804c2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121940 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'xmloff')
-rw-r--r--xmloff/source/core/xmltoken.cxx9
-rw-r--r--xmloff/source/draw/animexp.cxx14
-rw-r--r--xmloff/source/draw/shapeimport.cxx2
3 files changed, 16 insertions, 9 deletions
diff --git a/xmloff/source/core/xmltoken.cxx b/xmloff/source/core/xmltoken.cxx
index f2f3495671f7..1e682a39fcb1 100644
--- a/xmloff/source/core/xmltoken.cxx
+++ b/xmloff/source/core/xmltoken.cxx
@@ -33,12 +33,19 @@ namespace xmloff::token {
{
struct XMLTokenEntry
{
- sal_Int32 nLength;
const char* pChar;
std::optional<OUString> xOUString;
+ sal_Int32 nLength;
#if OSL_DEBUG_LEVEL > 0
XMLTokenEnum eToken;
#endif
+#if OSL_DEBUG_LEVEL > 0
+ XMLTokenEntry(sal_Int32 nLen, const char* p, std::optional<OUString> xStr, XMLTokenEnum eTok)
+ : pChar(p), xOUString(std::move(xStr)), nLength(nLen), eToken(eTok) {}
+#else
+ XMLTokenEntry(sal_Int32 nLen, const char* p, std::optional<OUString> xStr)
+ : pChar(p), xOUString(std::move(xStr)), nLength(nLen) {}
+#endif
};
}
diff --git a/xmloff/source/draw/animexp.cxx b/xmloff/source/draw/animexp.cxx
index 65b791e2455e..f839506dbdd4 100644
--- a/xmloff/source/draw/animexp.cxx
+++ b/xmloff/source/draw/animexp.cxx
@@ -192,7 +192,7 @@ void SdXMLImplSetEffect( AnimationEffect eEffect, XMLEffect& eKind, XMLEffectDir
namespace {
-enum XMLActionKind
+enum XMLActionKind : sal_Int8
{
XMLE_SHOW,
XMLE_HIDE,
@@ -202,27 +202,27 @@ enum XMLActionKind
struct XMLEffectHint
{
- XMLActionKind meKind;
- bool mbTextEffect;
Reference<XShape> mxShape;
+ XMLActionKind meKind;
+ bool mbTextEffect;
XMLEffect meEffect;
XMLEffectDirection meDirection;
sal_Int16 mnStartScale;
AnimationSpeed meSpeed;
- sal_Int32 maDimColor;
OUString maSoundURL;
- bool mbPlayFull;
+ sal_Int32 maDimColor;
sal_Int32 mnPresId;
+ bool mbPlayFull;
bool operator<(const XMLEffectHint& rComp) const { return mnPresId < rComp.mnPresId; }
XMLEffectHint()
: meKind( XMLE_SHOW ), mbTextEffect( false ),
meEffect( EK_none ), meDirection( ED_none ), mnStartScale( -1 ),
- meSpeed( AnimationSpeed_SLOW ), maDimColor(0), mbPlayFull( false ),
- mnPresId( 0 )
+ meSpeed( AnimationSpeed_SLOW ), maDimColor(0),
+ mnPresId( 0 ), mbPlayFull( false )
{}
};
diff --git a/xmloff/source/draw/shapeimport.cxx b/xmloff/source/draw/shapeimport.cxx
index cc114a8f636b..c338c15c724a 100644
--- a/xmloff/source/draw/shapeimport.cxx
+++ b/xmloff/source/draw/shapeimport.cxx
@@ -64,9 +64,9 @@ namespace {
struct ConnectionHint
{
css::uno::Reference< css::drawing::XShape > mxConnector;
- bool bStart;
OUString aDestShapeId;
sal_Int32 nDestGlueId;
+ bool bStart;
};
}