mirror of
https://github.com/aaru-dps/Aaru.Helpers.git
synced 2025-12-16 19:24:35 +00:00
Convert if to switch statement.
This commit is contained in:
14
PrintHex.cs
14
PrintHex.cs
@@ -62,11 +62,17 @@ public static class PrintHex
|
||||
int offsetLength = $"{array.Length:X}".Length;
|
||||
var sb = new StringBuilder();
|
||||
|
||||
if(last > 0)
|
||||
rows++;
|
||||
switch(last)
|
||||
{
|
||||
case > 0:
|
||||
rows++;
|
||||
|
||||
if(last == 0)
|
||||
last = width;
|
||||
break;
|
||||
case 0:
|
||||
last = width;
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
if(offsetLength < str.Length)
|
||||
offsetLength = str.Length;
|
||||
|
||||
Reference in New Issue
Block a user