summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2017-10-06 08:55:26 +0200
committerStephan Bergmann <sbergman@redhat.com>2017-10-06 10:05:00 +0200
commit4fc52078f6afa4368b2f4de3cd700e474b7a417f (patch)
treeeaf349ac004cc81df8c03d3f71a49ae8c2305356 /sw
parent192a0152ff56890b406fbacfe365c452caba7fc7 (diff)
Improve performance of loplugin:commaoperator
...by avoiding calls to parentStmt, thereby also improving the precision of exactly which comma operators to ignore (which turned up a handful more finds). Also added tests. Change-Id: Ie74f824fd7f54131aab09b59086452fb4f3ff827 Reviewed-on: https://gerrit.libreoffice.org/43181 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/doc/number.cxx20
1 files changed, 16 insertions, 4 deletions
diff --git a/sw/source/core/doc/number.cxx b/sw/source/core/doc/number.cxx
index 415e3ce10752..fabadb97b065 100644
--- a/sw/source/core/doc/number.cxx
+++ b/sw/source/core/doc/number.cxx
@@ -487,17 +487,29 @@ SwNumRule::~SwNumRule()
int n;
for( n = 0; n < MAXLEVEL; ++n, ++ppFormats )
- delete *ppFormats, *ppFormats = nullptr;
+ {
+ delete *ppFormats;
+ *ppFormats = nullptr;
+ }
// Outline:
for( n = 0; n < MAXLEVEL; ++n, ++ppFormats )
- delete *ppFormats, *ppFormats = nullptr;
+ {
+ delete *ppFormats;
+ *ppFormats = nullptr;
+ }
ppFormats = &SwNumRule::maLabelAlignmentBaseFormats[0][0];
for( n = 0; n < MAXLEVEL; ++n, ++ppFormats )
- delete *ppFormats, *ppFormats = nullptr;
+ {
+ delete *ppFormats;
+ *ppFormats = nullptr;
+ }
for( n = 0; n < MAXLEVEL; ++n, ++ppFormats )
- delete *ppFormats, *ppFormats = nullptr;
+ {
+ delete *ppFormats;
+ *ppFormats = nullptr;
+ }
}
maTextNodeList.clear();