summaryrefslogtreecommitdiff
path: root/vcl/skia
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2020-08-05 09:58:34 +0200
committerStephan Bergmann <sbergman@redhat.com>2020-08-05 11:30:20 +0200
commit2e12d210cac8d031c21cdda9c37c1551f967ddc4 (patch)
treefc65a051484b7eab2ad5132f18aa88187206cefa /vcl/skia
parented3ccdbde9ace7d2e3d67a9cc83a189cfaf1cad9 (diff)
Silence loplugin:staticmethods when the definition involves preprocessing
...to help avoid false positives. (Another option to silence such warnings is to add (void) this; to false-positive function bodies, but this new approach may be more natural in certain cases.) Change-Id: Ie6ea908730c596dbfb62ff42ae60dbd0a00a8fc9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100152 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'vcl/skia')
-rw-r--r--vcl/skia/gdiimpl.cxx7
1 files changed, 5 insertions, 2 deletions
diff --git a/vcl/skia/gdiimpl.cxx b/vcl/skia/gdiimpl.cxx
index 066311e97c2b..c092bb549a22 100644
--- a/vcl/skia/gdiimpl.cxx
+++ b/vcl/skia/gdiimpl.cxx
@@ -176,17 +176,20 @@ public:
}
#ifndef NDEBUG
virtual ~SkiaFlushIdle() { free(debugname); }
+#endif
const char* get_debug_name(SkiaSalGraphicsImpl* pGraphics)
{
+#ifndef NDEBUG
// Idle keeps just a pointer, so we need to store the string
debugname = strdup(
OString("skia idle 0x" + OString::number(reinterpret_cast<sal_uIntPtr>(pGraphics), 16))
.getStr());
return debugname;
- }
#else
- const char* get_debug_name(SkiaSalGraphicsImpl*) { return "skia idle"; }
+ (void)pGraphics;
+ return "skia idle";
#endif
+ }
virtual void Invoke() override
{