diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2015-04-28 16:39:20 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-04-28 16:39:20 +0200 |
commit | abce3f30ac8e1c1d40c76de611b6a10d00d7555c (patch) | |
tree | bbcd582ba503b0550a2c0b602329a449c52e587b /vcl | |
parent | af48ad2120b3240826edbd0af2a28531adeb5154 (diff) |
loplugin:simplifybool
Change-Id: I7c79be5e48cb14bc0b3aeeca83608076515a30f4
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/control/ctrl.cxx | 2 | ||||
-rw-r--r-- | vcl/source/window/window2.cxx | 38 |
2 files changed, 20 insertions, 20 deletions
diff --git a/vcl/source/control/ctrl.cxx b/vcl/source/control/ctrl.cxx index 85ca49501f24..2aaa2f122a3a 100644 --- a/vcl/source/control/ctrl.cxx +++ b/vcl/source/control/ctrl.cxx @@ -113,7 +113,7 @@ void Control::CreateLayoutData() const bool Control::HasLayoutData() const { - return mpControlData ? mpControlData->mpLayoutData != NULL : false; + return mpControlData && mpControlData->mpLayoutData != NULL; } ::vcl::ControlLayoutData* Control::GetLayoutData() const diff --git a/vcl/source/window/window2.cxx b/vcl/source/window/window2.cxx index c43563e7db74..e10eb93f504b 100644 --- a/vcl/source/window/window2.cxx +++ b/vcl/source/window/window2.cxx @@ -1021,27 +1021,27 @@ vcl::Window* Window::ImplGetFrameWindow() const bool Window::IsDockingWindow() const { - return mpWindowImpl ? mpWindowImpl->mbDockWin : false; + return mpWindowImpl && mpWindowImpl->mbDockWin; } bool Window::ImplIsFloatingWindow() const { - return mpWindowImpl ? mpWindowImpl->mbFloatWin : false; + return mpWindowImpl && mpWindowImpl->mbFloatWin; } bool Window::ImplIsSplitter() const { - return mpWindowImpl ? mpWindowImpl->mbSplitter : false; + return mpWindowImpl && mpWindowImpl->mbSplitter; } bool Window::ImplIsPushButton() const { - return mpWindowImpl ? mpWindowImpl->mbPushButton : false; + return mpWindowImpl && mpWindowImpl->mbPushButton; } bool Window::ImplIsOverlapWindow() const { - return mpWindowImpl ? mpWindowImpl->mbOverlapWin : false; + return mpWindowImpl && mpWindowImpl->mbOverlapWin; } void Window::ImplSetMouseTransparent( bool bTransparent ) @@ -1122,22 +1122,22 @@ Dialog* Window::GetParentDialog() const bool Window::IsSystemWindow() const { - return mpWindowImpl ? mpWindowImpl->mbSysWin : false; + return mpWindowImpl && mpWindowImpl->mbSysWin; } bool Window::IsDialog() const { - return mpWindowImpl ? mpWindowImpl->mbDialog : false; + return mpWindowImpl && mpWindowImpl->mbDialog; } bool Window::IsMenuFloatingWindow() const { - return mpWindowImpl ? mpWindowImpl->mbMenuFloatingWindow : false; + return mpWindowImpl && mpWindowImpl->mbMenuFloatingWindow; } bool Window::IsToolbarFloatingWindow() const { - return mpWindowImpl ? mpWindowImpl->mbToolbarFloatingWindow : false; + return mpWindowImpl && mpWindowImpl->mbToolbarFloatingWindow; } void Window::EnableAllResize( bool bEnable ) @@ -1152,17 +1152,17 @@ void Window::EnableChildTransparentMode( bool bEnable ) bool Window::IsChildTransparentModeEnabled() const { - return mpWindowImpl ? mpWindowImpl->mbChildTransparent : false; + return mpWindowImpl && mpWindowImpl->mbChildTransparent; } bool Window::IsMouseTransparent() const { - return mpWindowImpl ? mpWindowImpl->mbMouseTransparent : false; + return mpWindowImpl && mpWindowImpl->mbMouseTransparent; } bool Window::IsPaintTransparent() const { - return mpWindowImpl ? mpWindowImpl->mbPaintTransparent : false; + return mpWindowImpl && mpWindowImpl->mbPaintTransparent; } void Window::SetDialogControlStart( bool bStart ) @@ -1172,7 +1172,7 @@ void Window::SetDialogControlStart( bool bStart ) bool Window::IsDialogControlStart() const { - return mpWindowImpl ? mpWindowImpl->mbDlgCtrlStart : false; + return mpWindowImpl && mpWindowImpl->mbDlgCtrlStart; } void Window::SetDialogControlFlags( sal_uInt16 nFlags ) @@ -1217,7 +1217,7 @@ bool Window::IsControlBackground() const bool Window::IsInPaint() const { - return mpWindowImpl ? mpWindowImpl->mbInPaint : false; + return mpWindowImpl && mpWindowImpl->mbInPaint; } vcl::Window* Window::GetParent() const @@ -1227,17 +1227,17 @@ vcl::Window* Window::GetParent() const bool Window::IsVisible() const { - return mpWindowImpl ? mpWindowImpl->mbVisible : false; + return mpWindowImpl && mpWindowImpl->mbVisible; } bool Window::IsReallyVisible() const { - return mpWindowImpl ? mpWindowImpl->mbReallyVisible : false; + return mpWindowImpl && mpWindowImpl->mbReallyVisible; } bool Window::IsReallyShown() const { - return mpWindowImpl ? mpWindowImpl->mbReallyShown : false; + return mpWindowImpl && mpWindowImpl->mbReallyShown; } bool Window::IsInInitShow() const @@ -1247,12 +1247,12 @@ bool Window::IsInInitShow() const bool Window::IsEnabled() const { - return mpWindowImpl ? !mpWindowImpl->mbDisabled : false; + return mpWindowImpl && !mpWindowImpl->mbDisabled; } bool Window::IsInputEnabled() const { - return mpWindowImpl ? !mpWindowImpl->mbInputDisabled : false; + return mpWindowImpl && !mpWindowImpl->mbInputDisabled; } bool Window::IsAlwaysEnableInput() const |