Skip to content

Commit 1dd6fc1

Browse files
blackspherefollowerqdot
authored andcommitted
Non-functional style fixed
1 parent 13ffa87 commit 1dd6fc1

9 files changed

Lines changed: 22 additions & 13 deletions

File tree

Buttplug.Client/ButtplugWSClient.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ private async void onPingTimer(object state)
273273
{
274274
_owningDispatcher.Invoke(() =>
275275
{
276-
ErrorReceived?.Invoke(this, new ErrorEventArgs((msg as Error)));
276+
ErrorReceived?.Invoke(this, new ErrorEventArgs(msg as Error));
277277
});
278278
throw new Exception((msg as Error).ErrorMessage);
279279
}

Buttplug.Components.Controls/ButtplugTabControl.xaml.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ public ButtplugTabControl()
5050
{
5151
_guiLog.Error("Sentry URL invalid, cannot submit crash reports!");
5252
}
53+
5354
// Cover all of the possible bases for WPF failure
5455
// http://stackoverflow.com/questions/12024470/unhandled-exception-still-crashes-application-after-being-caught
5556
AppDomain.CurrentDomain.UnhandledException += CurrentDomainOnUnhandledException;

Buttplug.Components.WebsocketServer/ButtplugWebsocketServer.cs

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
using System.Net;
33
using System.Threading;
44
using System.Threading.Tasks;
5+
using Buttplug.Core.Messages;
56
using Buttplug.Server;
67
using JetBrains.Annotations;
78
using vtortola.WebSockets;
8-
using Buttplug.Core.Messages;
99

1010
namespace Buttplug.Components.WebsocketServer
1111
{
@@ -105,8 +105,14 @@ private async Task HandleConnectionAsync(WebSocket ws, CancellationToken cancell
105105
catch (Exception)
106106
{
107107
// TODO Log here.
108-
try { ws.Close(); }
109-
catch { }
108+
try
109+
{
110+
ws.Close();
111+
}
112+
catch
113+
{
114+
// noop
115+
}
110116
}
111117
finally
112118
{

Buttplug.Core/ButtplugLog.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
using System;
2-
using Buttplug.Logging;
32
using Buttplug.Core.Messages;
3+
using Buttplug.Logging;
44
using JetBrains.Annotations;
55
using static Buttplug.Core.Messages.Error;
66

Buttplug.Server.Managers.UWPBluetoothManager/UWPBluetoothDeviceFactory.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
using System;
22
using System.Linq;
33
using System.Threading.Tasks;
4-
using Buttplug.Server.Bluetooth;
54
using Buttplug.Core;
65
using Buttplug.Core.Messages;
6+
using Buttplug.Server.Bluetooth;
77
using JetBrains.Annotations;
88
using Windows.Devices.Bluetooth;
99
using Windows.Devices.Bluetooth.Advertisement;

Buttplug.Server.Managers.UWPBluetoothManager/UWPBluetoothDeviceInterface.cs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
using System;
22
using System.Runtime.InteropServices.WindowsRuntime;
33
using System.Threading.Tasks;
4-
using Buttplug.Server.Bluetooth;
54
using Buttplug.Core;
65
using Buttplug.Core.Messages;
6+
using Buttplug.Server.Bluetooth;
77
using JetBrains.Annotations;
88
using Windows.Devices.Bluetooth;
99
using Windows.Devices.Bluetooth.GenericAttributeProfile;
@@ -15,12 +15,15 @@ internal class UWPBluetoothDeviceInterface : IBluetoothDeviceInterface
1515
{
1616
public string Name => _bleDevice.Name;
1717

18-
[CanBeNull]
19-
private BluetoothLEDevice _bleDevice;
2018
[NotNull]
2119
private readonly GattCharacteristic[] _gattCharacteristics;
20+
21+
[CanBeNull]
22+
private BluetoothLEDevice _bleDevice;
23+
2224
[NotNull]
2325
private readonly IButtplugLog _bpLogger;
26+
2427
[CanBeNull]
2528
private IAsyncOperation<GattCommunicationStatus> _currentTask;
2629

Buttplug.Server.Managers.UWPBluetoothManager/UWPBluetoothManager.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
using System;
22
using System.Collections.Generic;
33
using System.Linq;
4-
using Buttplug.Server.Bluetooth;
54
using Buttplug.Core;
5+
using Buttplug.Server.Bluetooth;
66
using JetBrains.Annotations;
77
using Microsoft.Win32;
88
using Windows.Devices.Bluetooth;
99
using Windows.Devices.Bluetooth.Advertisement;
10-
using Buttplug.Server;
1110

1211
namespace Buttplug.Server.Managers.UWPBluetoothManager
1312
{

Buttplug.Server.Test/ButtplugDeviceTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
using System;
22
using System.Linq;
3-
using Buttplug.Server.Bluetooth;
43
using Buttplug.Core;
4+
using Buttplug.Server.Bluetooth;
55
using Xunit;
66

77
namespace Buttplug.Server.Test

Buttplug.Server.Test/TestBluetoothSubtypeManager.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
using System.Collections.Generic;
2-
using Buttplug.Server.Bluetooth;
32
using Buttplug.Core;
3+
using Buttplug.Server.Bluetooth;
44

55
namespace Buttplug.Server.Test
66
{

0 commit comments

Comments
 (0)