[Libreoffice-commits] core.git: vcl/unx
Jan-Marek Glogowski
glogow at fbihome.de
Thu Oct 5 08:20:28 UTC 2017
vcl/unx/gtk/gtkdata.cxx | 3 +--
vcl/unx/gtk3/gtk3gtkdata.cxx | 3 +--
2 files changed, 2 insertions(+), 4 deletions(-)
New commits:
commit 0cb424fec7389801578085b618c5ad68a98f4637
Author: Jan-Marek Glogowski <glogow at fbihome.de>
Date: Wed Sep 27 16:42:57 2017 +0200
Minimize GtkSalData scope in timeout callback
After commit 2e8a95d1f87a3dbdcc8846fa44d1899abc8edd9c this doesn't
anymore generate false positives in the constparams clang plugin:
vcl/unx/gtk/gtkdata.cxx:817:39: error: ...
... this parameter can be const [loplugin:constparams]
static gboolean call_userEventFn( void *data )
^~~~~~~~~~
1 error generated.
/vcl/unx/gtk3/gtk3gtkdata.cxx:782:39: error: ...
... this parameter can be const [loplugin:constparams]
static gboolean call_userEventFn( void *data )
^~~~~~~~~~
1 error generated.
Change-Id: Id8d42a0c14bfcc887ec1ecbf70f4c41c26e26efb
Reviewed-on: https://gerrit.libreoffice.org/42912
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Jan-Marek Glogowski <glogow at fbihome.de>
diff --git a/vcl/unx/gtk/gtkdata.cxx b/vcl/unx/gtk/gtkdata.cxx
index da70c0fbd62c..77abe724298d 100644
--- a/vcl/unx/gtk/gtkdata.cxx
+++ b/vcl/unx/gtk/gtkdata.cxx
@@ -816,12 +816,11 @@ void GtkSalTimer::Stop()
extern "C" {
static gboolean call_userEventFn( void *data )
{
- GtkSalData *pThis = static_cast<GtkSalData *>(data);
SolarMutexGuard aGuard;
const SalGenericDisplay *pDisplay = GetGenericUnixSalData()->GetDisplay();
if ( pDisplay )
{
- GtkSalDisplay *pThisDisplay = pThis->GetGtkDisplay();
+ GtkSalDisplay *pThisDisplay = static_cast<GtkSalData *>(data)->GetGtkDisplay();
assert(static_cast<const SalGenericDisplay *>(pThisDisplay) == pDisplay);
pThisDisplay->DispatchInternalEvent();
}
diff --git a/vcl/unx/gtk3/gtk3gtkdata.cxx b/vcl/unx/gtk3/gtk3gtkdata.cxx
index fbd449ef4ec6..f4d41a53d2c0 100644
--- a/vcl/unx/gtk3/gtk3gtkdata.cxx
+++ b/vcl/unx/gtk3/gtk3gtkdata.cxx
@@ -781,12 +781,11 @@ void GtkSalTimer::Stop()
extern "C" {
static gboolean call_userEventFn( void *data )
{
- GtkSalData *pThis = static_cast<GtkSalData *>(data);
SolarMutexGuard aGuard;
const SalGenericDisplay *pDisplay = GetGenericUnixSalData()->GetDisplay();
if ( pDisplay )
{
- GtkSalDisplay *pThisDisplay = pThis->GetGtkDisplay();
+ GtkSalDisplay *pThisDisplay = static_cast<GtkSalData *>(data)->GetGtkDisplay();
assert(static_cast<const SalGenericDisplay *>(pThisDisplay) == pDisplay);
pThisDisplay->DispatchInternalEvent();
}
More information about the Libreoffice-commits
mailing list