summaryrefslogtreecommitdiff
path: root/sd/source
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2018-10-17 14:31:35 +0200
committerStephan Bergmann <sbergman@redhat.com>2018-10-17 23:02:41 +0200
commit151c1f3d03f668a756d077009e0b8f6843458f93 (patch)
tree684ff928d0ceb2b158ca46e3b49309872a9320ae /sd/source
parent99fa8d59f8cc3f06ce4fbe6b5ec834e9e30ae3b4 (diff)
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@redhat.com>
Diffstat (limited to 'sd/source')
-rw-r--r--sd/source/ui/remotecontrol/BluetoothServer.cxx10
1 files changed, 5 insertions, 5 deletions
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 );