[Libreoffice-commits] core.git: sd/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Wed Oct 17 21:03:39 UTC 2018
sd/source/ui/remotecontrol/BluetoothServer.cxx | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
New commits:
commit 151c1f3d03f668a756d077009e0b8f6843458f93
Author: Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Wed Oct 17 14:31:35 2018 +0200
Commit: Stephan Bergmann <sbergman at redhat.com>
CommitDate: Wed Oct 17 23:02:41 2018 +0200
Turn sd::BluetoothServer::Impl into scoped enum
...to avoid -Werror,-Wshadow from Clang trunk with
<https://reviews.llvm.org/D52400> "Improve -Wshadow warnings with enumerators",
warning about shadowing of UNKNOWN in anonymous enum in
sd/source/ui/remotecontrol/BluetoothServer.hxx
Change-Id: Ie0e6794da82c79ae2f8fd848c3c015c873fd60aa
Reviewed-on: https://gerrit.libreoffice.org/61878
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman at redhat.com>
diff --git a/sd/source/ui/remotecontrol/BluetoothServer.cxx b/sd/source/ui/remotecontrol/BluetoothServer.cxx
index c3cd93d73c6a..14a61315c86e 100644
--- a/sd/source/ui/remotecontrol/BluetoothServer.cxx
+++ b/sd/source/ui/remotecontrol/BluetoothServer.cxx
@@ -90,14 +90,14 @@ struct sd::BluetoothServer::Impl {
GMainContext *mpContext;
DBusConnection *mpConnection;
DBusObject *mpService;
- enum BluezVersion { BLUEZ4, BLUEZ5, UNKNOWN };
+ enum class BluezVersion { BLUEZ4, BLUEZ5, UNKNOWN };
BluezVersion maBluezVersion;
Impl()
: mpContext( g_main_context_new() )
, mpConnection( nullptr )
, mpService( nullptr )
- , maBluezVersion( UNKNOWN )
+ , maBluezVersion( BluezVersion::UNKNOWN )
{ }
std::unique_ptr<DBusObject> getAdapter()
@@ -106,7 +106,7 @@ struct sd::BluetoothServer::Impl {
{
return mpService->cloneForInterface( "org.bluez.Adapter" );
}
- else if (spServer->mpImpl->maBluezVersion == BLUEZ5)
+ else if (spServer->mpImpl->maBluezVersion == BluezVersion::BLUEZ5)
{
return getBluez5Adapter(mpConnection);
}
@@ -1181,7 +1181,7 @@ void SAL_CALL BluetoothServer::run()
SAL_INFO("sdremote.bluetooth", "Using Bluez 5");
registerBluez5Profile(pConnection, mpCommunicators);
mpImpl->mpConnection = pConnection;
- mpImpl->maBluezVersion = Impl::BLUEZ5;
+ mpImpl->maBluezVersion = Impl::BluezVersion::BLUEZ5;
// We don't need to listen to adapter changes anymore -- profile
// registration is done globally for the entirety of bluez, so we only
@@ -1212,7 +1212,7 @@ void SAL_CALL BluetoothServer::run()
}
// Otherwise we could be on Bluez 4 and continue as usual.
- mpImpl->maBluezVersion = Impl::BLUEZ4;
+ mpImpl->maBluezVersion = Impl::BluezVersion::BLUEZ4;
// Try to setup the default adapter, otherwise wait for add/remove signal
mpImpl->mpService = registerWithDefaultAdapter( pConnection );
More information about the Libreoffice-commits
mailing list