Improve loplugin:doubleconvert

(The use of isa_and_nonnull<> instead of isa<> is necessary for cases like

  return (i_styleSettings.*i_getDefaultColor)();

in lcl_getEffectiveColor, svtools/source/table/gridtablerenderer.cxx.)

Change-Id: Iffc59b1146dd4ce13bbd3c8a6f46bd3c78a39344
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109663
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
This commit is contained in:
Stephan Bergmann
2021-01-20 08:02:19 +01:00
parent 04e2aa3430
commit 4b55847b81
4 changed files with 27 additions and 14 deletions

View File

@@ -17,6 +17,9 @@ int main()
col2 = sal_Int32(
col1); // expected-error@-1 {{redundant double conversion [loplugin:doubleconvert]}}
(void)col2;
// expected-error@+1 {{redundant double conversion [loplugin:doubleconvert]}}
Color col3 = sal_Int32(Color());
(void)col3;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */