diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2018-11-09 15:52:14 +0300 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2018-11-10 09:16:53 +0100 |
commit | e3560f4770487c8d38463fb4a9a63325abc385f9 (patch) | |
tree | cc2ea6d5d18de966e4677ebfd846c1bf5ec5c216 /vcl/unx/generic | |
parent | 77e3cb338f576757fd875bc60952ac22530f6a7a (diff) |
Replace deprecated boost::optional::reset(val) with operator =
Change-Id: I7340a561e0df0c781fd834388deb4b9f83800f9b
Reviewed-on: https://gerrit.libreoffice.org/63221
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'vcl/unx/generic')
-rw-r--r-- | vcl/unx/generic/window/screensaverinhibitor.cxx | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/vcl/unx/generic/window/screensaverinhibitor.cxx b/vcl/unx/generic/window/screensaverinhibitor.cxx index 675b79269627..4b9253d6869e 100644 --- a/vcl/unx/generic/window/screensaverinhibitor.cxx +++ b/vcl/unx/generic/window/screensaverinhibitor.cxx @@ -50,14 +50,14 @@ void ScreenSaverInhibitor::inhibit( bool bInhibit, const OUString& sReason, if ( bIsX11 ) { - if ( pDisplay != boost::none ) + if (pDisplay) { inhibitXScreenSaver( bInhibit, pDisplay.get() ); inhibitXAutoLock( bInhibit, pDisplay.get() ); inhibitDPMS( bInhibit, pDisplay.get() ); } - if ( xid != boost::none ) + if (xid) { inhibitGSM( bInhibit, appname, aReason.getStr(), xid.get() ); inhibitMSM( bInhibit, appname, aReason.getStr(), xid.get() ); @@ -72,8 +72,8 @@ static void dbusInhibit( bool bInhibit, const std::function<GVariant*( GDBusProxy*, const guint, GError*& )>& fUnInhibit, boost::optional<guint>& rCookie ) { - if ( ( !bInhibit && ( rCookie == boost::none ) ) || - ( bInhibit && ( rCookie != boost::none ) ) ) + if ( ( !bInhibit && !rCookie ) || + ( bInhibit && rCookie ) ) { return; } @@ -130,7 +130,7 @@ static void dbusInhibit( bool bInhibit, else { res = fUnInhibit( proxy, rCookie.get(), error ); - rCookie = boost::none; + rCookie.reset(); if (res != nullptr) { @@ -281,12 +281,12 @@ void ScreenSaverInhibitor::inhibitXScreenSaver( bool bInhibit, Display* pDisplay XSetScreenSaver( pDisplay, 0, nInterval, bPreferBlanking, bAllowExposures ); } - else if ( !bInhibit && ( mnXScreenSaverTimeout != boost::none ) ) + else if ( !bInhibit && mnXScreenSaverTimeout ) { XSetScreenSaver( pDisplay, mnXScreenSaverTimeout.get(), nInterval, bPreferBlanking, bAllowExposures ); - mnXScreenSaverTimeout = boost::none; + mnXScreenSaverTimeout.reset(); } } |