Kaydet (Commit) 0cb424fe authored tarafından Jan-Marek Glogowski's avatar Jan-Marek Glogowski

Minimize GtkSalData scope in timeout callback

After commit 2e8a95d1 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/42912Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarJan-Marek Glogowski <glogow@fbihome.de>
üst 62c040e5
......@@ -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();
}
......
......@@ -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();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment