Skip to content

Commit

Permalink
Automatic code cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Tomáš Kouba committed May 13, 2024
1 parent c341d9c commit 384f4d7
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 7 deletions.
7 changes: 3 additions & 4 deletions MTPCmd/Extensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
using MTPCmd.Options;
using System;
using System.Collections.Generic;
using System.Text;

namespace MTPCmd
{
Expand All @@ -16,10 +15,10 @@ public static MediaDevice FirstOrDefault(this IEnumerable<MediaDevice> devices,
{
if ((String.IsNullOrWhiteSpace(deviceOption.FriendlyName) && String.IsNullOrWhiteSpace(deviceOption.Manufacturer))
||
(String.IsNullOrWhiteSpace(deviceOption.Manufacturer) &&
(String.IsNullOrWhiteSpace(deviceOption.Manufacturer) &&
String.Equals(device.FriendlyName, deviceOption.FriendlyName, StringComparison.CurrentCultureIgnoreCase))
||
(String.IsNullOrWhiteSpace(deviceOption.FriendlyName) &&
(String.IsNullOrWhiteSpace(deviceOption.FriendlyName) &&
String.Equals(device.Manufacturer, deviceOption.Manufacturer, StringComparison.CurrentCultureIgnoreCase))
||
(String.Equals(device.FriendlyName, deviceOption.FriendlyName, StringComparison.CurrentCultureIgnoreCase) &&
Expand All @@ -46,7 +45,7 @@ public static string SizeSuffix(Int64 value, int decimalPlaces = 1)
// mag is 0 for bytes, 1 for KB, 2, for MB, etc.
int mag = (int)Math.Log(value, 1024);

// 1L << (mag * 10) == 2 ^ (10 * mag)
// 1L << (mag * 10) == 2 ^ (10 * mag)
// [i.e. the number of bytes in the unit corresponding to mag]
decimal adjustedSize = (decimal)value / (1L << (mag * 10));

Expand Down
2 changes: 0 additions & 2 deletions MTPCmd/Options/ListOption.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
using CommandLine;
using System;
using System.Collections.Generic;
using System.Text;

namespace MTPCmd.Options
{
Expand Down
1 change: 0 additions & 1 deletion MTPCmd/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
using MTPCmd.Options;
using System;
using System.Collections.Generic;
using System.Data;
using System.IO;
using System.Linq;

Expand Down

0 comments on commit 384f4d7

Please sign in to comment.