diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2015-04-24 12:34:53 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-04-24 12:36:31 +0200 |
commit | a9a4d46ce74fc3c4ff1b7399ea6be6ffeeeb8863 (patch) | |
tree | f44261f69c3c6c5cb13095d092ea538a8d47a5e0 /vcl/osx | |
parent | 9796e52ab3bbf64fa751c71e695c64d6215e1df6 (diff) |
loplugin:simplifybool
Change-Id: I8276e8b356ff26241613de64bcd90b5dbcd92f29
Diffstat (limited to 'vcl/osx')
-rw-r--r-- | vcl/osx/salframeview.mm | 2 | ||||
-rw-r--r-- | vcl/osx/salnativewidgets.cxx | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/vcl/osx/salframeview.mm b/vcl/osx/salframeview.mm index 37b4602c4f9d..4a5166333e67 100644 --- a/vcl/osx/salframeview.mm +++ b/vcl/osx/salframeview.mm @@ -1497,7 +1497,7 @@ private: nRet = mpFrame->CallCallback( SALEVENT_KEYINPUT, &aEvent ); std::map< NSEvent*, bool >::iterator it = GetSalData()->maKeyEventAnswer.find( mpLastEvent ); if( it != GetSalData()->maKeyEventAnswer.end() ) - it->second = nRet ? true : false; + it->second = nRet != 0; if( AquaSalFrame::isAlive( mpFrame ) ) mpFrame->CallCallback( SALEVENT_KEYUP, &aEvent ); } diff --git a/vcl/osx/salnativewidgets.cxx b/vcl/osx/salnativewidgets.cxx index 041df334a051..72e035f5a7f4 100644 --- a/vcl/osx/salnativewidgets.cxx +++ b/vcl/osx/salnativewidgets.cxx @@ -333,7 +333,7 @@ bool AquaSalGraphics::hitTestNativeControl( ControlType nType, ControlPart nPart */ UInt32 AquaSalGraphics::getState( ControlState nState ) { - const bool bDrawActive = mpFrame ? ([mpFrame->getNSWindow() isKeyWindow] ? true : false) : true; + const bool bDrawActive = mpFrame == nullptr || [mpFrame->getNSWindow() isKeyWindow]; if( !(nState & ControlState::ENABLED) || ! bDrawActive ) { if( ! (nState & ControlState::HIDDEN) ) @@ -353,7 +353,7 @@ UInt32 AquaSalGraphics::getState( ControlState nState ) UInt32 AquaSalGraphics::getTrackState( ControlState nState ) { - const bool bDrawActive = mpFrame ? ([mpFrame->getNSWindow() isKeyWindow] ? true : false) : true; + const bool bDrawActive = mpFrame == nullptr || [mpFrame->getNSWindow() isKeyWindow]; if( ! (nState & ControlState::ENABLED) || ! bDrawActive ) return kThemeTrackInactive; @@ -419,7 +419,7 @@ bool AquaSalGraphics::drawNativeControl(ControlType nType, #else if (rControlRegion.Top() == 0 && nPart == PART_DRAW_BACKGROUND_HORZ) { - const bool bDrawActive = mpFrame ? ([mpFrame->getNSWindow() isKeyWindow] ? true : false) : true; + const bool bDrawActive = mpFrame == nullptr || [mpFrame->getNSWindow() isKeyWindow]; CGFloat unifiedHeight = rControlRegion.GetHeight(); CGRect drawRect = CGRectMake(rControlRegion.Left(), rControlRegion.Top(), rControlRegion.GetWidth(), rControlRegion.GetHeight()); CUIDraw([NSWindow coreUIRenderer], drawRect, mrContext, |