summaryrefslogtreecommitdiff
path: root/vcl/unx/generic/app
diff options
context:
space:
mode:
authorNoel <noelgrandin@gmail.com>2020-10-01 11:01:41 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-10-01 12:19:27 +0200
commitcc2b7c1f930bc05253153f3c8381fb4fb352f3ca (patch)
tree0a285ec4c67933a58fcf4ca991bfc745e715e059 /vcl/unx/generic/app
parent5ed9f4638e1ff12b3246a66ffee8dd9dd74b9693 (diff)
loplugin:reducevarscope in vcl
Change-Id: I768aa9bd87913bc20351fb631a6326fe01f777b0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103748 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vcl/unx/generic/app')
-rw-r--r--vcl/unx/generic/app/wmadaptor.cxx12
1 files changed, 4 insertions, 8 deletions
diff --git a/vcl/unx/generic/app/wmadaptor.cxx b/vcl/unx/generic/app/wmadaptor.cxx
index fc17cc080957..62dfcf94ce8c 100644
--- a/vcl/unx/generic/app/wmadaptor.cxx
+++ b/vcl/unx/generic/app/wmadaptor.cxx
@@ -532,7 +532,6 @@ GnomeWMAdaptor::GnomeWMAdaptor( SalDisplay* pSalDisplay ) :
// check for GnomeWM
if( m_aWMAtoms[ WIN_SUPPORTING_WM_CHECK ] && m_aWMAtoms[ WIN_PROTOCOLS ] )
{
- ::Window aWMChild = None;
if( XGetWindowProperty( m_pDisplay,
m_pSalDisplay->GetRootWindow( m_pSalDisplay->GetDefaultXScreen() ),
m_aWMAtoms[ WIN_SUPPORTING_WM_CHECK ],
@@ -549,10 +548,9 @@ GnomeWMAdaptor::GnomeWMAdaptor( SalDisplay* pSalDisplay ) :
&& nItems != 0
)
{
- aWMChild = *reinterpret_cast< ::Window* >(pProperty);
+ ::Window aWMChild = *reinterpret_cast< ::Window* >(pProperty);
XFree( pProperty );
pProperty = nullptr;
- ::Window aCheckWindow = None;
GetGenericUnixSalData()->ErrorTrapPush();
if( XGetWindowProperty( m_pDisplay,
aWMChild,
@@ -573,7 +571,7 @@ GnomeWMAdaptor::GnomeWMAdaptor( SalDisplay* pSalDisplay ) :
{
GetGenericUnixSalData()->ErrorTrapPush();
- aCheckWindow = *reinterpret_cast< ::Window* >(pProperty);
+ ::Window aCheckWindow = *reinterpret_cast< ::Window* >(pProperty);
XFree( pProperty );
pProperty = nullptr;
if( aCheckWindow == aWMChild )
@@ -733,7 +731,6 @@ bool WMAdaptor::getNetWmName()
if( m_aWMAtoms[ NET_SUPPORTING_WM_CHECK ] && m_aWMAtoms[ NET_WM_NAME ] )
{
- ::Window aWMChild = None;
if( XGetWindowProperty( m_pDisplay,
m_pSalDisplay->GetRootWindow( m_pSalDisplay->GetDefaultXScreen() ),
m_aWMAtoms[ NET_SUPPORTING_WM_CHECK ],
@@ -750,10 +747,9 @@ bool WMAdaptor::getNetWmName()
&& nItems != 0
)
{
- aWMChild = *reinterpret_cast< ::Window* >(pProperty);
+ ::Window aWMChild = *reinterpret_cast< ::Window* >(pProperty);
XFree( pProperty );
pProperty = nullptr;
- ::Window aCheckWindow = None;
GetGenericUnixSalData()->ErrorTrapPush();
if( XGetWindowProperty( m_pDisplay,
aWMChild,
@@ -773,7 +769,7 @@ bool WMAdaptor::getNetWmName()
if ( ! GetGenericUnixSalData()->ErrorTrapPop( false ) )
{
GetGenericUnixSalData()->ErrorTrapPush();
- aCheckWindow = *reinterpret_cast< ::Window* >(pProperty);
+ ::Window aCheckWindow = *reinterpret_cast< ::Window* >(pProperty);
XFree( pProperty );
pProperty = nullptr;
if( aCheckWindow == aWMChild )